Author Topic: How To Reset Grid ?  (Read 4786 times)

ronperkins

  • Newbie
  • *
  • Posts: 4
    • View Profile
How To Reset Grid ?
« on: January 09, 2016, 05:56:03 am »
I'm unable to find an option to allow me to completely reset the grid back... i.e. clear filters, clear sorts

The purpose of this is to allow the user to click a Refresh Button which will clear all filters and any sorts and will reset the grid back to its initial state.

Thanks

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: How To Reset Grid ?
« Reply #1 on: January 11, 2016, 09:27:39 pm »
The way/code to reset filter is here:

http://paramquery.com/forum/index.php?topic=1299

and to clear sorting, sort() method can be used with empty sorter. http://paramquery.com/pro/api#method-sort

If you want to clear both of them simultaneously, then sortModel.sorter can be cleared with help of option() before calling the above code to reset filtering.


Single reset() method has been added in the next version to reset filtering, sorting and grouping simultaneously, thanks for your feedback.
« Last Edit: January 11, 2016, 09:29:14 pm by paramquery »