Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Tanvi sood on Oct 29, 2009 08:09
open dhtmlx forum
date sorting in table data

given below is the header definition of date column
<td sort="date" width="80" align="right" format="%d/%m/%Y" type="dhxCalendar">

data is displayed in the given below order:
<td>20/07/2009</td>
<td>14/07/2009</td>
<td>18/10/2009</td>

Ideally data should be in asc or desc order according to the sorting direction, please suggest any solution.
Answer posted by dhxSupport on Oct 29, 2009 08:34
You can use sortRows() method to sort row in necessary order. Please find more information here http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxgrid:api_method_dhtmlxgridobject_sortrows
In case of initialization from httml you can call this command before grid was initialized:
 <table name="grid" class="dhtmlxGrid"  oninit="doOnInit()">
...
function doOnInit(){
grid.sortRows(col, type, order);
}