fletchsod
fletchsod

Reputation: 3729

Iterate through each of the group column?

Since I use the jqGrid's GroupingGroupBy to group column(s), so how do I get a list (rows) of group column only?

Also, how do I iterate through rows inside a group column?

Also, how do I tell the spreadsheet is group columns?

Thanks.

Upvotes: 0

Views: 1831

Answers (1)

Oleg
Oleg

Reputation: 222007

I am not sure which "group column(s)" you mean. You can use

var $groupRows = $("#grid").find(">tbody>tr.jqgroup");

to get the array of <tr> element of grid which represent grouping headers.

Alternatively you can get information about the groups by

var groups = $("#grid").jqGrid("getGridParam", "groupingView").groups;

and iterate over the array groups. Look at the code of the demo for an example.

Upvotes: 1

Related Questions