ParamQuery grid support forum

General Category => Help for ParamQuery Grid (free version) => Topic started by: shoushouleb on August 23, 2018, 03:57:17 pm

Title: Fill grid from json
Post by: shoushouleb 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?
Title: Re: Fill grid from json
Post by: paramvir on August 24, 2018, 11:49:49 am
Please check this example:

https://paramquery.com/demos/nesting_local
Title: Re: Fill grid from json
Post by: shoushouleb 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?