Can I get the Group Index Number of single selected row?
Can I get the Group Index Number of single selected row?
aftab ahmed
Posts: 5Questions: 2Answers: 0
in Select
Can I get the Group Index Number of single selected row?
what I want is to disable the selection for other groups, if a user select one row of group, he can only select the Rows of that group only,
I just want the group index of selected row.
Answers
Just to check, is this referring to RowGroup? You can't prevent selects, but you could toggle it back through the API. If you can confirm, then I can add more,
Colin
yes i am using RowGroup
What i mean is i want a Group id of each row in endRender so that i append it in each row as data-groupnumber
endRender: function (rows, group) {
jobSummaryRowGroupNumber++;
rows.nodes().each((tr,y) => {
$(tr).attr('data-groupnumber', jobSummaryRowGroupNumber)
})
}
for now i am use counter which is not the good way i think.
I don't understand why you need to generate an index. Can you use the value of the
rowGroup.dataSrc
column to keep track of group when the row is selected?Maybe you can provide a simple test case showing what you are trying to do so we can offer suggestions.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin