How can I access HTML element of individual grouping levels in multilevel grouping.
How can I access HTML element of individual grouping levels in multilevel grouping.
I am using rowGroup extension to group on two different columns. I am then using start render to add a button on the grouped row. I have a requirement to add two different kind of buttons on two grouped rows, but when I am using start render, it is creating same html tag for both the grouped row.
attached is my grouped rows.
rowGroup: {
dataSrc: ['effDa', 'prodClas'],
startRender: function(rows, group) {
var appendClass = readOnlyMode == true ? "hide" : ""
return $('<tr/>')
.append('<td colspan="13"><b>' + group + '<span display:inline-block; style="margin-right: 77.8%";> </span><button type="button" style="margin-left:0px;height: 200x;height: 23px;" class="btn btn-primary delete '+ appendClass +'" id="delete">Add Term</button> </td>')
.attr('data-name', group);
}
},
This question has accepted answers - jump to:
Answers
The
rowGroup.startRender
function has an additional parameter calledlevel
. Maybe you can use that to determine the level and which HTML to return.Kevin
@kthorngren thanks..it is working as expected. Is there a way to have a expand/collapse functionality in multilevel group. Like a "+" sign or "->" arrow sign
Start with thisexample from this thread.
Kevin
@kthorngren thanks so much.