I forgot this:
You can run this on $().ready(function() {
SetHeaderSortLinks('aGrid', 'Get()');
});
In the global js include.
function SetHeaderSortLinks(parent, functionToCall) {
//Clear existing links
$("#" + parent + " th").unbind("onclick");
$("#" + parent + " th").bind("click", function () {
var sortOn = $(this)[0].sort;
if (currentSortField == sortOn)
currentSortAsc = !currentSortAsc;
currentSortField = sortOn;
eval(functionToCall);
});
}
I'll probably add some css to change the cursor on mouseover based on the attribute (probably add an additional class in the function above)…