Hi,
I want to sort a grid which has a column of type date.
I don’t want to sort the column on clicking the header. I am disabling it.
Just after loading the grid with all the records, I want to sort the grid once according to the date column.
Please help me with this.
Thank u,
Babu
mygrid.loadXML(url,function(){
mygrid.sortRows(1,“date”,“asc”);
});
Where 1 - index of column
Hi,
I can do that way to sort the grid records by column, but here I am not loading the records from a xml file or from some url. So after init() I want to sort the records by date column in ascending order.
Guide me through this.
Thank you for the reply.
Just call sortRows in necessary place,
grid.init();
grid.addRow(…
…
grid.sortRows(index,type,order);