This is a migrated thread and some comments may be shown as answers.

Grid Column sorting

1 Answer 52 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
George
Top achievements
Rank 1
George asked on 24 Oct 2010, 09:26 PM
I have a grid with columns: ID, Name which is sorted by Name when the page loads. When I click on the name column it changes the sorting from Asc to Desc but then if I click the column again it removes the sorting by that column and sorts the grid rows by ID (the ID column is not sortable). How can I change this behavior? I don't want this 3-state behavior, it should be sorted only by Name: Asc or Desc, how can I change this?

1 Answer, 1 is accepted

Sort by
0
Bob
Top achievements
Rank 1
answered on 09 Nov 2010, 11:23 PM
The 3-state behavior is 1 - sorted ascending by name, 2 - sorted descending by name, 3 - unsorted (shown in the order retrieved from the database). If your data comes to the grid sorted by name, sorting it by name will change nothing, sorting descending will have an effect, and making it unsorted will return it to its original state.

In no case will it be sorted by ID, unless it starts that way.

Bob
Tags
Grid
Asked by
George
Top achievements
Rank 1
Answers by
Bob
Top achievements
Rank 1
Share this question
or