ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: Jignesh on May 12, 2020, 09:15:30 am
-
Hi Paramvir,
I have created fiddle demo for Collapse/Expand row in Grid.
https://jsfiddle.net/cherishPatel/8jqys3e5/18/
If user click on Id 17 row's "Collapse" button then 18 and 19 Ids should be hide and button name changed "Expand'.
And click on Id 17 row's "Expand" button then 18,19 Ids should be show and button name changed to "Collapse".
Thank you,
Jignesh
-
Your use case closely resembles that of treegrid.
Please follow it rather than trying to reinvent the wheel.
https://paramquery.com/pro/demos/treegrid
And call the Tree() API methods collapseNodes, expandNodes from click of buttons.
https://paramquery.com/pro/api#method-Tree
-
Hi Paramvir,
We have required functionality base on collapse and Expand button on row level so tree functionality does not work for our case.
I have also added code on Prerender method, below URL for that https://jsfiddle.net/cherishPatel/8jqys3e5/28/
I have able to collapse and expand rows base on the row button. The only issue we have not able to change the button name or +/- sign.
Thank you,
Jignesh
-
We have required functionality base on collapse and Expand button on row level so tree functionality does not work for our case.
Collapse and Expand buttons can be used instead of default node renderers in treegrid with help of column.render
I have able to collapse and expand rows base on the row button.
I don't see it working in your jsfiddle. Please use inbuilt Tree() API to expand / collapse rows instead of writing the logic from scratch.