DHTMLX Docs & Samples Explorer

saveSortingToCookie(name,cookie_param)

Required library edition: This method requires Professional Edition of the DHTMLX library
Required library file: dhtmlxgrid_ssc.js

save sorting order to cookie

  • name - optional, cookie name
  • cookie_param - additional parameters added to cookie
mygrid.attachEvent("onAfterSorting", function(index,type,direction){
          //minimal parameters set
          mygrid.saveSortingToCookie();
          //maximal parameters set
          mygrid.saveSortingToCookie("some_name","expires=Fri, 31-Dec-2010 23:59:59 GMT");
   });

See also: enableSortingSaving, loadSortingFromCookie