public/javascripts/yui/datatable/datatable.js
function() {
    var elTbody = this._elTbody,
        elBdContainer = this._elBdContainer;
    
    // X-scrolling not enabled
    if(!this.get("width")) {
        // Snap outer container width to content
        this._elContainer.style.width = 
                (elBdContainer.scrollHeight > elBdContainer.clientHeight) ?
                // but account for y-scrollbar since it is visible
                (elTbody.parentNode.clientWidth + 19) + "px" :
                // no y-scrollbar, just borders
                (elTbody.parentNode.clientWidth + 2) + "px";
    }
}
function() {
    var elTbody = this._elTbody,
        elBdContainer = this._elBdContainer;
    
    // X-scrolling not enabled
    if(!this.get("width")) {
        // Snap outer container width to content
        this._elContainer.style.width = 
                (elBdContainer.scrollHeight > elBdContainer.clientHeight) ?
                // but account for y-scrollbar since it is visible
                (elTbody.parentNode.clientWidth + 19) + "px" :
                // no y-scrollbar, just borders
                (elTbody.parentNode.clientWidth + 2) + "px";
    }
}
function ( ) { var elTbody = this . _elTbody , elBdContainer = this . _elBdContainer ; // X-scrolling not enabled if ( ! this . get ( "width" ) ) { // Snap outer container width to content this . _elContainer . style . width = ( elBdContainer . scrollHeight > elBdContainer . clientHeight ) ? // but account for y-scrollbar since it is visible ( elTbody . parentNode . clientWidth + 19 ) + "px" : // no y-scrollbar, just borders ( elTbody . parentNode . clientWidth + 2 ) + "px" ; } }
Snaps container width for y-scrolling tables.

@method _syncScrollY
@private
Snaps container width for y - scrolling tables .