Skip to content

Replies

0
Annasaheb
Annasaheb answered on Dec 4, 2012 11:05 PM

Thanks, I had to write a code to get the table header and assign class to correct span. here is a code, may be useful for other coders.

// set sortField & sortOrderDesc  before calling this routine.

$("#dataGrid").data("igGrid").headersTable().find("thead tr th").each(function() {
    if (this.id.indexOf(sortField) != -1) {
        var sortClass = (sortOrderDesc) ? "ui-iggrid-colindicator-desc ui-icon ui-icon-arrowthick-1-s" : "ui-iggrid-colindicator-asc ui-icon ui-icon-arrowthick-1-n"
        $(this).find(".ui-iggrid-colindicator").addClass(sortClass);
    }
}).end();