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

How do I initiate a sort from code?

1 Answer 23 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 08 Jan 2010, 06:20 PM
I want to initiate sort on the grid from code.  I am not having success.

This is what I've tried:

gvDocumentListing.Columns[4].SortingState = Telerik.Windows.Controls.SortingState.Descending;

 

gvDocumentListing.Rebind();



This does not work.  I saw in an earlier post that some one called Columns.Reset().    This method appears to have been removed.

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 11 Jan 2010, 07:23 AM
Hi Brian,

You can add SortDescriptor in SortDescriptors collection to achieve your goal.

Sincerely yours,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Brian
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or