Author Topic: Quickest way to remove all rows from grid..  (Read 5371 times)

[email protected]

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 4
    • View Profile
Quickest way to remove all rows from grid..
« on: April 02, 2014, 06:52:13 pm »
What is the quickest way to remove all rows from grid without an ajax call for no records...   If I have a table with 1000 rows and I just want to clear the grid to 0 rows by a click of a button...

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Quickest way to remove all rows from grid..
« Reply #1 on: April 02, 2014, 06:59:30 pm »
Code: [Select]
$grid.pqGrid( 'option', 'dataModel.data', [] );
$grid.pqGrid( 'refreshView' );

[email protected]

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Quickest way to remove all rows from grid..
« Reply #2 on: April 02, 2014, 07:02:44 pm »
Perfect!!! Thank you Sir!!