Sort order changes after I remove filter dhtmlxgrid

Hi,

The dhtmlxgrid previous sort order is lost after I performing these steps:

  1. Filter the grid with a text filter.
  2. Sort the filtered grid.
  3. Remove the filter.

Expected Behavior: Sort behavior in Step 2 should retain.
What happens: Sort behavior in Step 2 is not retained.

Can somebody help me resolve this bug.


Thanks
Syed Anas Razvi

You may try to save the sorting state after each sorting:

grid.attachEvent("onAfterSorting", function(index,type,direction){ grid.saveSortingToCookie(); });
And load the saved sorting after the filtering:

grid.attachEvent("onFilterEnd", function(elements){ grid.loadSortingFromCookie(); });

It worked. Thanks. Appreciate