How can I reset Grid sorting?

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

    Posted 12 Oct 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
    Admin
    Kostadin avatar
    1711 posts

    Posted 17 Oct Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. A
    A avatar
    35 posts
    Member since:
    Nov 2015

    Posted 24 Oct in reply to Kostadin Link to this post

    Works like a charm :)

    Thanks a lot for helping me on this!

    Cheers,
    Axel

Back to Top