I have a grid which should always be sorted by the first column, a Date column.
I use an initial sort function:
function initsort(){
mygrid.sortRows(0,"date","asc");
}
(But it would only work after a 1 sec timeout after onLoad).
The problem is that when a select filter is applied to another column, the initial sort order goes away.
I tried this:
grid.attachEvent("onFilterEnd", initsort);
but apparently onFilterEnd does not get called after the filter event.
Is there another way to keep the sort on the first column after a filter event?
Unfortunately the issue cannot be reconstructed.
Sorting in the onFilterEnd event works well for us.
Also the sorting works well in case of calling it after the data is loaded.
If issue still occurs - please, provide any kind of sample of your code to reconstruct the issue.
Ok I’ll attach my code file. Any help will appreciated.
I have tried to attach the onFilterEnd event handler two ways.
First
mygrid.attachEvent("onFilterEnd", dosort);
And
mygrid.attachEvent("onFilterEnd",function() {
alert("myGrid_doOnFilterEnd");
dosort();
});
I can’t find in the documentation were the arguments of the event handler are defined.
Here is my code file…[code]
Our Parents' Letters
[/code]
onFilterEnd event works only with client-side filtration.
In case of using connector’s filters you need to use events of dhtmlxConnector.