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

[Solved] Restrict Column Sort to be just Ascending or Descending

1 Answer 112 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Deepak N
Top achievements
Rank 1
Deepak N asked on 18 Aug 2009, 09:37 AM
Hi,

Is it possible to turn off canceling sort on third click on column header. It should not allow SortingState.None.

1 Answer, 1 is accepted

Sort by
0
Accepted
Rossen Hristov
Telerik team
answered on 20 Aug 2009, 02:32 PM
Hi Deepak N,

When we release the fix that I have mentioned in the other post this will be possible by handling the Sorting event and setting NewSortState to Ascending and Descending only (swapping them each time sorting is requested):

        static void playersGrid_Sorting(object sender, GridViewSortingEventArgs e) 
        { 
            if (e.NewSortingState == SortingState.None) 
            { 
                e.NewSortingState = SortingState.Ascending; 
            } 
        } 
 

I hope that this will be available in the Latest Internal Build which should be released tomorrow.

Sincerely yours,
Ross
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Deepak N
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or