ParamQuery grid support forum
General Category => Help for ParamQuery Grid (free version) => Topic started by: Digitalsoft on July 17, 2023, 05:17:01 pm
-
Hi Team,
Is it possible in pq grid to expand/collpase rows dynamically either in group model /tree grid having the button at the grid header.
ex:
see in the pic collpase.png , I am having + button in the header customer, master lf, and localfamily and all the first 4 columns are under groupmodel.
when I click on + button in the master lf header , the rows should expand as in the expand.png, i.e rows should expand upto masterlf column
similarly when I click on + button in the local family header , rows should expand upto localfamily column.
Is it possible to have this structure in pq grid. Please let me know
-
Yes it's possible with pqgrid,
1) use column.title callback function to add an icon in the header cell.
https://paramquery.com/pro/api#option-column-title
2) use headerCellClick event to detect click on icon in header cell.
https://paramquery.com/pro/api#event-headerCellClick
3) use grid.Group().collapse and expand API to collapse and expand the grouping levels
https://paramquery.com/pro/api#method-Group
-
But regarding point 3, Before expand/ collapse a particular node how to identify whether the node is in collapsed or expanded state?