w2grid.reset

Resets the grid to the initial state.
reset([noRefresh])
noRefresh boolean, indicates if to refresh the grid after reset
Returns undefined.

Description

The .reset() method will do the following:
  • Set vertical scroll position to 0
  • Set horizontal scroll position to 0
  • Clear user search
  • Clear user sort
  • Unselect selected records
  • Collapse expanded records
  • If remote data source, it will retrieve records with offset = 0
This method will not remove records (use .clear for that). If you just want to reset search fields, you need to use .searchReset method. After reset is complete, the .refresh method will be called, unless you pass noRefresh indicator.
If you have grid defined in the following way: You can reset grid by:

User Comments

comments powered by Disqus