Retrieve grid column sorting data

Is it possible to retrieve the column sorting information on a grid? I don’t see a getColSorting() function. I realize that I can get the serialized grid header by using setSerializationLevel() then serialize() but it is painful to change the serialization level and also parse the returned xml just to get the value of the “sort” attribute.



Alternatively, is it possible to explicitly retrieve the attributes on a header?



I’m using the Professional edition.



Thanks,



Phil.

There is the next method
grid.getSortingState();
returns the array, first element is index of sorted column, second - direction of sorting (“asc” or “des”)

>> to explicitly retrieve the attributes on a header
You can get sorting state or text value of column, there is no any other accessible values can be retrieved from header.

Thanks for the prompt reply.

Yes, I’m aware of grid.getSortingState() but this doesn’t return the data I need; this only gives me the id and direction of the sorted column.

What I want to get is the sort information on each column in the grid. Suppose i have the following grid…



Column 1
Column 2
Column 3
Column 4



…i want to be able to retrieve the value of the sort attribute on every column. If possible I want to do this without writing a function which serializes the headers and then parses each column for the sort attribute.

Thanks for the prompt reply.

Yes, I’m aware of grid.getSortingState() but this doesn’t return the data I need; this only gives me the id and direction of the sorted column.

What I want to get is the sort information on each column in the grid. Suppose i have the following grid…



Column 1
Column 2
Column 3
Column 4



…i want to be able to retrieve the value of the sort attribute on every column. If possible I want to do this without writing a function which serializes the headers and then parses each column for the sort attribute.

Unfortunately there is not appropriate method which can allow you get type of the column sorting.