1

Closed

Client Sorting assumes all columns are sortable (ignoring 'Sortable(false)' on grid or columns)

description

In other words if you have cells that are .Sortable(false), the extension will still make it sortable. I made this change in the .js under the enableClientSort function:
 
            $.each(headerCells, function (idx, cell) {
                var tlink = $(cell).children('a.t-link');
                if (tlink.length > 0) {
                    var $a = $('<a class="t-link t-state-default" />');
                    $a.html(tlink.html());
                    cell.innerHTML = $('<div>').append($a.clone()).html();
                }
            });
 
What it does is checks if there is an anchor tag with 't-link', if so, then clone it while stripping out the href (shouldn't we be using removeAttr("href")?
 
What Telerik Grid does when a column is not sortable is it makes a SPAN tag instead of an A (anchor) tag, but still has the class "t-link" associated (but it is not sortable). Let me know if I missed anything! Good job with the extensions nonetheless!!
Closed Sep 30, 2011 at 9:56 PM by jddevight
Another good catch! Thanks.

comments