Author Topic: how to remove all rows?  (Read 1412 times)

msdnweixiao

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 21
    • View Profile
how to remove all rows?
« on: November 18, 2020, 07:21:02 am »
i can't find the api of remove grid's all rows.  thank you.
or  how to get all rows of grid?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6124
    • View Profile
Re: how to remove all rows?
« Reply #1 on: November 18, 2020, 10:36:15 am »
Get all rows:

Code: [Select]
   var all_rows = grid.pageData();

delete all rows:

Code: [Select]
  grid.deleteNodes( grid.pageData() );

msdnweixiao

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: how to remove all rows?
« Reply #2 on: November 18, 2020, 11:18:31 am »
thank you.