Author Topic: Get the obj from the grid  (Read 1660 times)

wstewart

  • Newbie
  • *
  • Posts: 5
    • View Profile
Get the obj from the grid
« on: November 12, 2020, 05:06:59 am »
Hi
Is there a function that returns the obj object that belongs to the grid.
The variable obj that was used to initialise seems to update most of the time ok
But occasionally it doesnt. So i was wondering if there is a function like
pqGrid. getObj() to make sure i am accessing the current version. I ve been experimenting
Dumping a json string representing obj.
Thanks.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Get the obj from the grid
« Reply #1 on: November 12, 2020, 06:45:20 am »
It's available as grid.options where grid is js instance.

Code: [Select]
var grid = $grid.pqGrid('instance'), obj = grid.options;

wstewart

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Get the obj from the grid
« Reply #2 on: November 13, 2020, 01:12:32 am »
Thanks - much better - I can restore. via JSON, all my data and headers etc and all I am now missing is the class information that I added to a particular cell.