rowgroup with multilevel grouping : using different startclassname

rowgroup with multilevel grouping : using different startclassname

MelodyNelsonMelodyNelson Posts: 213Questions: 33Answers: 2

Link to test case: https://live.datatables.net/podumeke/1/edit?html,css,js,output
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:

Hi,

I have a table with 3 levels of grouping.
I want to use different css for each level of grouping for the startClassName

What I want to achieve is to display only the level 0 group at the beginning and hide the levels 1 and 2.
At the beginning only because at the end, there will be totals for each group.

If I could add the class « is-hidden » to the startClassName for the levels 1 and 2 and another css for the level 0, it should do the trick.

Another approach could be to delete the rows for the levels 1 and 2 but I don't how how to do it.

I have tried to contol the display of levels using startRender but I could only change the content of the level.

I have created a test case here :
https://live.datatables.net/podumeke/1/edit?html,css,js,output

Thanks for your help

Replies

  • MelodyNelsonMelodyNelson Posts: 213Questions: 33Answers: 2

    I found a CSS solution, maybe not the best but it works :

    .myClass.dtrg-level-1, .myClass.dtrg-level-2 {display: none !important;}
    
  • allanallan Posts: 63,441Questions: 1Answers: 10,459 Site admin

    Yup, that's probably the base way to achieve what you are looking for at the moment.

    Allan

  • MelodyNelsonMelodyNelson Posts: 213Questions: 33Answers: 2

    Thanks for your feedback Allan

Sign In or Register to comment.