Sort on different column


Is there a way to sort an other column then the one you clicked on? For example, I’ve clicked on the header of column 8 but the sorting happens based on the values in column 7.


Hi Benv,

if u want to sort by column 1 then see the below syntax
if u want to sort by all the columns then add to the function that how many columns

In grid row check box working fine…but how user identify the current tab
in particular(checkbox)column…other text column easily identify.but checkbox column not identify(this is current tab or not)…give the solution asap…


We have had some functionality changes so I need to work in a different way. Therefore I haven’t been able to test the sugested solution. But thanks anyway. Maybe I still need it in the future.

Krishnan: I have my doubts that’s the right solution? Maybe I didn’t explain it all to well. Here’s an example.

[col_to_sort] | [col1] | [col2] | [col_clicked]
201101011200 | … | … | 01/01/2011
201101021200 | … | … | 02/01/2011

So when I click on the 4th column, the grid should be sorted by the values of the 1ste column. If using setColSorting is still the right way to do it, then thank you very much!! :slight_smile:

Actually you can use setColSorting for such tasks.
By using setColSorting you can assign custom sorting function to the column, which receives values and id’s of sorted rows. It is pretty easy to compare in such custom function values from different column.