Author Topic: Refresh Grid and Checkboxes disappearing  (Read 2265 times)

mikep

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 163
    • View Profile
Refresh Grid and Checkboxes disappearing
« on: May 18, 2020, 08:49:15 pm »
https://jsfiddle.net/q1fnmtr0/1/
On the example above, if I click Refresh0 and then Refresh1, why do the checkboxes disappear?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Refresh Grid and Checkboxes disappearing
« Reply #1 on: May 19, 2020, 09:08:03 am »
It's because Refresh0 is incorrect way to refresh a grid. Grid constructor can't be called again once the grid is initialized.
« Last Edit: May 19, 2020, 09:11:33 am by paramvir »

mikep

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 163
    • View Profile
Re: Refresh Grid and Checkboxes disappearing
« Reply #2 on: June 03, 2020, 09:25:39 pm »
is there a way to remove the grid from memory, so that I can recall the constructor and re-initialize? When I call refreshdataandview, I lose the checkboxes in my app (I cannot recreate this in JSFiddle yet). So maybe re-initializing will get around this.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Refresh Grid and Checkboxes disappearing
« Reply #3 on: June 03, 2020, 09:37:05 pm »
For that you would need to destroy the grid.

https://paramquery.com/pro/api#method-destroy

mikep

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 163
    • View Profile
Re: Refresh Grid and Checkboxes disappearing
« Reply #4 on: June 04, 2020, 12:07:19 am »
That works great. Thank You.