How can I reset Grid sorting?

3 posts, 1 answers
  1. A
    A avatar
    41 posts
    Member since:
    Nov 2015

    Posted 12 Oct 2016 Link to this post

    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. Answer
    Kostadin avatar
    1733 posts

    Posted 17 Oct 2016 Link to this post


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

    I hope this suggestion helps.

    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.
  3. A
    A avatar
    41 posts
    Member since:
    Nov 2015

    Posted 24 Oct 2016 in reply to Kostadin Link to this post

    Works like a charm :)

    Thanks a lot for helping me on this!


Back to Top