Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Stevo on Jul 25, 2008 02:01
open dhtmlx forum
[GRID] Sort by first column by default

This must be easy - how to set sorting to first column after grid loads ?
Answer posted by Support on Jul 25, 2008 02:41
To actually sort rows
    grid.sortRows(0)

To just mark column as sorted
    grid.setSortImgState(true,0,"asc");
Answer posted by Support on Jul 25, 2008 02:45
The loading is async, so you will need to use
    grid.load(url,function(){
       grid.sortRows(0);
    });