Author Topic: Fill grid from json  (Read 2217 times)

shoushouleb

  • Newbie
  • *
  • Posts: 12
    • View Profile
Fill grid from json
« on: August 23, 2018, 03:57:17 pm »
I have two JSON strings, one contains the data that should be the parent rows and the second that should be the children rows.
Each object in the second string has a property called parentID that has a value that exists in the parent string (so I know each child row to which parent row should be linked)
How can i fill the grid with these two objects, so I have a children rows for each parent row?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Fill grid from json
« Reply #1 on: August 24, 2018, 11:49:49 am »

shoushouleb

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Fill grid from json
« Reply #2 on: August 24, 2018, 01:12:40 pm »
Thank you,

I have checked the example and understood it, however I have the following problems:
- the grid is not rendered (the columns and rows are not shown)until I call the refresh() inside the debugger, or I click the scroll of the grid, if I  called it  inside the code, it is not rendering!

- I have many columns in both parent and children row, where the grid has a 'New' button in the toolbar to add a new parent or child row (taken from your examples)  , should I use the same workflow to load the JSON with the mentioned grid structure?
« Last Edit: August 24, 2018, 01:37:33 pm by shoushouleb »