ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: mikep on October 04, 2024, 06:51:30 am

Title: Hide the first column in the column group when the group is expanded
Post by: mikep on October 04, 2024, 06:51:30 am
The first column in my column group is a calculated column and I only want it to display when the column is collapsed.
Can you add the Javascript to this file so that the column "rollup" is hidden when the group is collapsed?

https://jsfiddle.net/ftjhrqum/
Title: Re: Hide the first column in the column group when the group is expanded
Post by: mikep on October 04, 2024, 04:36:15 pm
Sorry, to clarify, "rollup" should be hidden when expanded and the only column visible when collapsed.
Title: Re: Hide the first column in the column group when the group is expanded
Post by: paramvir on October 04, 2024, 07:39:33 pm
This is done by setting collapsible.last of parent to null and setting showifOpen of children columns as per your requirement.

Code: [Select]
title: "Level1", align: "center", collapsible: {last: null},
colModel: [
  {title: "rollup", dataindx:"mycalc", showifOpen: false},
  {title: "project", dataindx:"company", showifOpen: true},
{title: "rank", dataindx:"rank",showifOpen: true}
]
},

https://jsfiddle.net/3jamf6x7/

PS: version of pqgrid is quite old in the jsfiddle.