rowGroup only Append count to Top rowgroup
rowGroup only Append count to Top rowgroup
Link to test case: https://jsfiddle.net/BeerusDev/5nLg4bt0/85/
Hello,
I am curious how I can replace the count character added to the 2nd row group (but remain in the first).
The data that I am applying to the second sub rowGroup looks like (1) High, (2) Normal, (3) Low. And with the count next to the data it is kind of an eye sore and could be confusing to some as it will look like:
(1) High (1) //desired result => (1) High
(2) Normal (1) //desired result => (2) Normal
The class that is applied to these sub rowGroups is collapsed dtrg-group dtrg-start dtrg-level-1
if that matters
Answers
The
rowGroup.startRender
docs describe the parameters with one of them beinglevel
. This is the group level. You can use this to customize the string that is returned for each group level at the end of the function.Kevin
Working example: https://jsfiddle.net/BeerusDev/5nLg4bt0/102/
I checked out the docs and wasn't able to find how to target the levels. Aside from only appending the count to the 0 level row, I want to also only append the priorityClass colors I defined in the rows.every() to to the subrows (level 1). Is that achievable with the rowgroup.startRender as well?
The first part of your
rowGroup.startRender
function uses thelevel
to handle collapsing the groups at both levels. Do something similar with if statements to process the data appropriately for each level.Kevin
Got it: