Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Collapse certain group jqGrid

Tags:

jquery

jqgrid

I am using jqGrid-4.4.1 with grouping columns.

I am well aware with grouping options at jqGrid documentation

....
groupingView: { 
              groupField: ['Group'],
              groupColumnShow: [false],
              groupCollapse: true

},
....

But, this collapses all groups in the table. I want to collapse only few groups not all.

Let say I have 3 groups in the table. Then I do want to collapse only 1 of it rest other should be open.

Is it possible ?

like image 524
Hardik Mishra Avatar asked Jan 03 '13 09:01

Hardik Mishra


1 Answers

I'm not aware of any configuration parameters which allow for individual group configuration, but one possible solution would be to start with the grid un-grouped, and then collapse the desired group using :

jQuery(tableName).jqGrid('groupingToggle',groupHeading);

once the data has loaded.

If you visit the demo page, click "Grouping" heading, and then "Simple grouping with array data", you can toggle the third group with :

jQuery('#list48').jqGrid('groupingToggle','list48ghead_0_2')

for example.

like image 176
Joe Carr Avatar answered Sep 19 '22 09:09

Joe Carr