The data in pqGrid can be grouped by columns. It's done by using nested column models, the rest of the procedure is same as creating normal grids.

Collapsible columns:

To make the columns collapsible, collapsible property can be set on any parent grouped column either during initialization or during runtime.

When parent is collapsed, all columns except the first or last child column are hidden depending upon value of collapsible.last

beforeColumnCollapse and columnCollapse events are fired when columns are expanded/collapsed through UI.

To programmatically collapse/expand a column or number of columns, get reference to column(s) and set column.collapsible.on to true/false