AutoSave not picking up sortRows

I have a grid with AutoSave enabled and a toolbar button allowing users to sort data using

mygrid.sortRows(1); . When you sort using the toolbar button it doesn’t update the cookie (the cookie does update if you sort by clicking on the grid header). Any ideas how I can get this working?

Please, try to call setSortImgState() method after the sortRows() calling:
docs.dhtmlx.com/doku.php?id=dhtm … rtimgstate

That didn’t seem to help. I have:

var listOptionId = toolbar.getListOptionSelected("sort_by"); 
			if(listOptionId == "company") {mygrid.sortRows(2); mygrid.setSortImgState(true,2);}

but the cookie is not set (I’m using the Firebug extension on FireFox to see the cookies). The cookie is set when I click the header to sort (I see ||2-asc|| ), but it does not update if I use the “Sort By” select button on the toolbar.

Thanks for your help with this.

Please, just try t o call:
grid.saveOrderToCookie();

after the sorting to save the order to cookies.