public/javascripts/yui/datatable/datatable.js
function(elCellLabel, oColumn, oSortedBy) {
    var sKey = oColumn.getKey();
    var sLabel = lang.isValue(oColumn.label) ? oColumn.label : sKey;

    // Add accessibility link for sortable Columns
    if(oColumn.sortable) {
        // Calculate the direction
        var sSortClass = this.getColumnSortDir(oColumn, oSortedBy);
        var bDesc = (sSortClass === DT.CLASS_DESC);

        // This is the sorted Column
        if(oSortedBy && (oColumn.key === oSortedBy.key)) {
            bDesc = !(oSortedBy.dir === DT.CLASS_DESC);
        }

        // Generate a unique HREF for visited status
        var sHref = this.getId() + "-href-" + oColumn.getSanitizedKey();
        
        // Generate a dynamic TITLE for sort status
        var sTitle = (bDesc) ? this.get("MSG_SORTDESC") : this.get("MSG_SORTASC");
        
        // Format the element
        elCellLabel.innerHTML = "<a href=\"" + sHref + "\" title=\"" + sTitle + "\" class=\"" + DT.CLASS_SORTABLE + "\">" + sLabel + "</a>";
    }
    // Just display the label for non-sortable Columns
    else {
        elCellLabel.innerHTML = sLabel;
    }
}
function(elCellLabel, oColumn, oSortedBy) {
    var sKey = oColumn.getKey();
    var sLabel = lang.isValue(oColumn.label) ? oColumn.label : sKey;

    // Add accessibility link for sortable Columns
    if(oColumn.sortable) {
        // Calculate the direction
        var sSortClass = this.getColumnSortDir(oColumn, oSortedBy);
        var bDesc = (sSortClass === DT.CLASS_DESC);

        // This is the sorted Column
        if(oSortedBy && (oColumn.key === oSortedBy.key)) {
            bDesc = !(oSortedBy.dir === DT.CLASS_DESC);
        }

        // Generate a unique HREF for visited status
        var sHref = this.getId() + "-href-" + oColumn.getSanitizedKey();
        
        // Generate a dynamic TITLE for sort status
        var sTitle = (bDesc) ? this.get("MSG_SORTDESC") : this.get("MSG_SORTASC");
        
        // Format the element
        elCellLabel.innerHTML = "<a href=\"" + sHref + "\" title=\"" + sTitle + "\" class=\"" + DT.CLASS_SORTABLE + "\">" + sLabel + "</a>";
    }
    // Just display the label for non-sortable Columns
    else {
        elCellLabel.innerHTML = sLabel;
    }
}
function ( elCellLabel , oColumn , oSortedBy ) { var sKey = oColumn . getKey ( ) ; var sLabel = lang . isValue ( oColumn . label ) ? oColumn . label : sKey ; // Add accessibility link for sortable Columns if ( oColumn . sortable ) { // Calculate the direction var sSortClass = this . getColumnSortDir ( oColumn , oSortedBy ) ; var bDesc = ( sSortClass === DT . CLASS_DESC ) ; // This is the sorted Column if ( oSortedBy && ( oColumn . key === oSortedBy . key ) ) { bDesc = ! ( oSortedBy . dir === DT . CLASS_DESC ) ; } // Generate a unique HREF for visited status var sHref = this . getId ( ) + "-href-" + oColumn . getSanitizedKey ( ) ; // Generate a dynamic TITLE for sort status var sTitle = ( bDesc ) ? this . get ( "MSG_SORTDESC" ) : this . get ( "MSG_SORTASC" ) ; // Format the element elCellLabel . innerHTML = "<a href=\"" + sHref + "\" title=\"" + sTitle + "\" class=\"" + DT . CLASS_SORTABLE + "\">" + sLabel + "</a>" ; } // Just display the label for non-sortable Columns else { elCellLabel . innerHTML = sLabel ; } }
Outputs markup into the given TH based on given Column.

@method DataTable.formatTheadCell
@param elCellLabel {HTMLElement} The label SPAN element within the TH liner,
not the liner DIV element.
@param oColumn {YAHOO.widget.Column} Column instance.
@param oSortedBy {Object} Sort state object literal.
Outputs markup into the given TH based on given Column .