Author Topic: Iteration on nested grid  (Read 2108 times)

NearEarthObject

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 30
    • View Profile
Iteration on nested grid
« 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

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Iteration on nested grid
« Reply #1 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()

NearEarthObject

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Iteration on nested grid
« Reply #2 on: March 09, 2020, 07:06:48 pm »
Thank you !!!

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