sort two columns

Hi, I have a grid with two columns, the first is filled with dates, the second is filled with time, Can I sort the grid using both columns if I press on the firts or second column??

Thanks!!!

It can be done with custom soring function docs.dhtmlx.com/doku.php?id=dhtmlxgrid:sorting

Thanks for replaying.

I have another question, the grid has tree columns I want it to order only by one column, I mean, the tree colums must have the same sort.
I did it in this way,
grid.setColSorting(“int,custom,custom”);

function custom(a,b,order){
if(order == “asc”)
grid.sortRows(0,“int”,“asc”);
else
grid.sortRows(0,“int”,“des”);
}

It is working but very slow, Do you know a faster solution??

Thanks!!

Try to use following function:

function custom(a,b,order){ if(order == "asc") return (a>b?1:-1); else return (a>b?-1:1); }

docs.dhtmlx.com/doku.php?id=dhtm … ve_sorting