Hi Matthew,
Here is an example of getting the group`s index:
$(‘#jqxgrid’).on(‘rowselect’, function (event) {
var args = event.args;
const index = getIndexOfGroupBySelectedRow(args);
//Assign the index to a variable
});
function getIndexOfGroupBySelectedRow(rowArgs) {
console.log(row);
const groupsCount = $(‘#jqxgrid’).jqxGrid(‘getrootgroupscount’);
let groupIndex = -1;
for (let i = 0; i < groupsCount; i++) {
const currentGroupName = $(‘#jqxgrid’).jqxGrid(‘getgroup’, i).group;
const rowData = rowArgs.row;
for (const key in rowData) {
groupIndex = i;
}
}
}
Please feel free to contact me if you need any further information!
Best regards,
Svetoslav Borislavov
jQWidgets Team
https://www.jqwidgets.com