How to make Second Sort?

Hi

I am doing sorting operation on column in grid and now i want to do second sorting operation on another column by keeping the first sorting.
Like this:
after first sort:
-first–second-
1 | 3 |

1 | 1 |

1 | 2 |

2 | 1 |

after second sort:

-first–second-
1 | 1 |

1 | 2 |

1 | 3 |

2 | 1 |

thank you,

you may do it by using complex function - complex soring function similar to the following one can be used:

[code] function sort_by_two(a,b,order,aid,bid){
if (a==b){
var a2=grid.cells(aid,1).getValue();
var b2=grid.cells(bid,1).getValue();
if(order==“asc”)
return a2>b2?1:-1;
else
return a2<b2?1:-1;
}

      if(order=="asc")
         return a>b?1:-1;
      else
         return a<b?1:-1;
    }[/code]

some other methods you may learn here: http://docs.dhtmlx.com/doku.php?id=dhtmlxgrid:sorting#sorting_by_multiple_columns

Thank you very much