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

RadGrid sorting - undo the sort

1 Answer 92 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dave Hollen
Top achievements
Rank 1
Dave Hollen asked on 31 Jan 2011, 10:16 PM
Hello,

I am using a RadGrid that allows the user to click on a column header and sort that column.

However, I have a button on the form that serves as a "grid reset" - and when clicking this button, I want to undo the sorting.  So, if any column was sorted (either ascending or descending), I want to undo that sort.  How would I do this?

Thanks,
Dave

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 01 Feb 2011, 06:47 AM
Hello Dave,


The following code will be helpful in clearing the sorting applied to grid.

Code:
this.RadGrid1.MasterTableView.SortExpressions.Clear();
this.RadGrid1.MasterTableView.Rebind();

Grid / Programmatic Sorting



-Shinu.
Tags
Grid
Asked by
Dave Hollen
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or