public/javascripts/yui/datatable/datatable.js
function(oColumn, nWidth) {
    oColumn = this.getColumn(oColumn);
    if(oColumn) {
        this._storeScrollPositions();

        // Validate new width against minWidth
        if(lang.isNumber(nWidth)) {
            nWidth = (nWidth > oColumn.minWidth) ? nWidth : oColumn.minWidth;

            // Save state
            oColumn.width = nWidth;
            
            // Resize the DOM elements
            this._setColumnWidth(oColumn, nWidth+"px");
            this._syncScroll();
            
            this.fireEvent("columnSetWidthEvent",{column:oColumn,width:nWidth});
        }
        // Unsets a width to auto-size
        else if(nWidth === null) {
            // Save state
            oColumn.width = nWidth;
            
            // Resize the DOM elements
            this._setColumnWidth(oColumn, "auto");
            this.validateColumnWidths(oColumn);
            this.fireEvent("columnUnsetWidthEvent",{column:oColumn});
        }
        
        // Bug 2339454: resize then sort misaligment
        this._clearTrTemplateEl();
    }
    else {
    }
}
function(oColumn, nWidth) {
    oColumn = this.getColumn(oColumn);
    if(oColumn) {
        this._storeScrollPositions();

        // Validate new width against minWidth
        if(lang.isNumber(nWidth)) {
            nWidth = (nWidth > oColumn.minWidth) ? nWidth : oColumn.minWidth;

            // Save state
            oColumn.width = nWidth;
            
            // Resize the DOM elements
            this._setColumnWidth(oColumn, nWidth+"px");
            this._syncScroll();
            
            this.fireEvent("columnSetWidthEvent",{column:oColumn,width:nWidth});
        }
        // Unsets a width to auto-size
        else if(nWidth === null) {
            // Save state
            oColumn.width = nWidth;
            
            // Resize the DOM elements
            this._setColumnWidth(oColumn, "auto");
            this.validateColumnWidths(oColumn);
            this.fireEvent("columnUnsetWidthEvent",{column:oColumn});
        }
        
        // Bug 2339454: resize then sort misaligment
        this._clearTrTemplateEl();
    }
    else {
    }
}
function ( oColumn , nWidth ) { oColumn = this . getColumn ( oColumn ) ; if ( oColumn ) { this . _storeScrollPositions ( ) ; // Validate new width against minWidth if ( lang . isNumber ( nWidth ) ) { nWidth = ( nWidth > oColumn . minWidth ) ? nWidth : oColumn . minWidth ; // Save state oColumn . width = nWidth ; // Resize the DOM elements this . _setColumnWidth ( oColumn , nWidth + "px" ) ; this . _syncScroll ( ) ; this . fireEvent ( "columnSetWidthEvent" , { column : oColumn , width : nWidth } ) ; } // Unsets a width to auto-size else if ( nWidth === null ) { // Save state oColumn . width = nWidth ; // Resize the DOM elements this . _setColumnWidth ( oColumn , "auto" ) ; this . validateColumnWidths ( oColumn ) ; this . fireEvent ( "columnUnsetWidthEvent" , { column : oColumn } ) ; } // Bug 2339454: resize then sort misaligment this . _clearTrTemplateEl ( ) ; } else { } }
Sets given Column to given pixel width. If new width is less than minWidth
width, sets to minWidth. Updates oColumn.width value.

@method setColumnWidth
@param oColumn {YAHOO.widget.Column} Column instance.
@param nWidth {Number} New width in pixels.
Sets given Column to given pixel width . If new width is less than minWidth width sets to minWidth . Updates oColumn . width value .