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

How can I reset Grid sorting?

2 Answers 243 Views
Grid
This is a migrated thread and some comments may be shown as answers.
A
Top achievements
Rank 1
A asked on 12 Oct 2016, 01:32 PM

I have the RadGrid within an RadAjaxPanel, along with some other controls to control which DataTable is to be displayed.

When I'm first sorting the Grid and then going to select another DataTable to display in the Grid, data binding fails with an error message telling me that the Grid cannot find the sorting column I selected for the first DataTable.

How can I reset the Grid's sorting/paging setting so it will start anew with a new DataTable assigned?

2 Answers, 1 is accepted

Sort by
0
Accepted
Kostadin
Telerik team
answered on 17 Oct 2016, 07:52 AM
Hello,

Clearing the RadGrid1.MasterTableView.SortExpressions collection, and rebinding the control will make sure no sort expressions are present.

I hope this suggestion helps.

Regards,
Kostadin
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
A
Top achievements
Rank 1
answered on 24 Oct 2016, 07:11 PM

Works like a charm :)

Thanks a lot for helping me on this!

Cheers,
Axel

Tags
Grid
Asked by
A
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
A
Top achievements
Rank 1
Share this question
or