ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: NearEarthObject on March 08, 2020, 01:43:45 pm

Title: Iteration on nested grid
Post by: NearEarthObject on March 08, 2020, 01:43:45 pm
Hi !
I have a one level nested grid, and create a save button to operate some ajax request at the top of the grid.
So I need to iterate some value all along the spreadsheet, but I notice that only expand 'row' are read.

So I explore the idea to force opening all 'pq_detail' and apply them the concept of show true, but i probably miss intellectually something in my approach to achieve this,
can you please provide a simple function who would expand all row ?

Thanks in advance !

Jeff
Title: Re: Iteration on nested grid
Post by: paramvir on March 09, 2020, 10:18:50 am
To exapand all row details, iterate through all rows and apply show: true to pq_detail property of rowData

Code: [Select]
grid.pageData().forEach(function(rd){
rd.pq_detail = {show: true};
})
grid.refresh()
Title: Re: Iteration on nested grid
Post by: NearEarthObject on March 09, 2020, 07:06:48 pm
Thank you !!!

I was simply missing the grid.refresh() !!!