3.2.0

Cancel sort but not visual action

Well I think the title explains this one :)

I am using AJAX so I am quering server for sorted data so I just want the grid to update it's header correctly but stop the sort still since theres no point since I am gonna populate the grid with sorted data

any help is appreciated
July 20,
ok found the solution to this though I would share :)

Grid.setAction("columnSort", function(src){
var i = src.getItemProperty("index");
var d = (this.getSortProperty("index") == i) && (this.getSortProperty("direction")=="ascending") ? "descending" : "ascending";
window.status = "Sorting...";

// Put your code in here to query server and load data back


this.setSortProperty("index", i);
this.setSortProperty("direction", d);
this.refresh();
this.timeout(function(){window.status = ""});
});
July 20,

This topic is archived.

See also:


Back to support forum