Rowgroup - create a Multi-level grouping with a single column

Rowgroup - create a Multi-level grouping with a single column

vinamavinama Posts: 6Questions: 3Answers: 1

Hello everyone.

Would it be possible to create multi-level grouping based on a single column?
the column would have values like:
group1
group1|group12
group2|group22|group23
group3
and the idea would be to simulate the groups based on | caracter as a separator.
I tried to create a function and link the function to dataSrc, but Ididn't manage to make it work.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,677Questions: 1Answers: 10,497 Site admin
    Answer ✓

    It is sort of possible... https://live.datatables.net/ciferize/1/edit .

    You need to specify a function for each grouping level. Also, if a level doesn't exist it will be shown as "No group". RowGroup expects all groups to have the same level of nesting.

    Allan

  • vinamavinama Posts: 6Questions: 3Answers: 1

    Thank you for the reply.
    The "No group" can be fixed by using the property emptyDataGroup: null.
    I was trying to archieve something more dinamic where I did't need to define the size of the array, but this is probably not possible. I guess I will just set a size of 4 array functions for now to get things going.
    https://live.datatables.net/xolurare/1/edit

  • allanallan Posts: 63,677Questions: 1Answers: 10,497 Site admin

    Yes, at the moment there isn't a way to do a dynamic depth group I'm afraid. I've logged it to look at as a future enhancement though.

    Allan

Sign In or Register to comment.