RowGroup disabled by default, but enabled by button/link
RowGroup disabled by default, but enabled by button/link
Hi,
I need to group rows based on the columns.
I found this example below (based on RowGroup - Data source change event) which is basically what I need and it's working fine.
In this example, the first time you load the table page, the rows are already grouped and you can change the 'group column' by clicking one of the links.
Here is my problem. I just want that the first time the table page loads, the rows are not grouped.
Only when the user clicks on one of the column links, the RowGroup feature is, let's say, "switched on".
Let me first say that I'm still learning JS..I tried various things like rowGroup().disable(),
drawCallback(), order.fixed(), ...
Can you help me?
Thanks so much.
Answers
This might be useful:
https://datatables.net/reference/option/rowGroup.enable
but I haven't used rowGroup so I don't really know.
The documentation on that page doesn't look very enlightening to me!
tangerine's suggestion won't work, I'm afraid, as that's an initialisation option. You would need to have it enabled with that option,
rowGroup.enable
, then disable it ininitComplete
withrowGroup().disable()
, and the enable it withrowGroup().enable()
when the time's right,Colin