RowGroup not appearing on datatables
RowGroup not appearing on datatables
![bmrobson](https://secure.gravatar.com/avatar/8f246f7e3f87ab9d21ed85a5faa01f17/?default=https%3A%2F%2Fvanillicon.com%2F8f246f7e3f87ab9d21ed85a5faa01f17_200.png&rating=g&size=120)
We've recently had to switch to datatables 2.0 while attempting to upgrade our project from Angular 14 to Angular 17. During this transition, we noticed a table that uses rowGroup is not working properly. No errors are shown, and there are no row groups displayed on the table.
I am adding rowGroup to our datatables object and setting dataSrc to 0, which is the column index we want to group by. This is consistent with the documentation, so I'm not sure what's going on.
Are there any breaking changes regarding versioning with datatables and rowGroups?
This question has an accepted answers - jump to answer
Answers
No, RowGroup with 2.0 works in this example.
Are you loading the RowGroup library?
Possibly you need to ask the Angular Datatables developers about this.
Can you post a test case showing the issue so we can help debug?
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
I've tried loading the RowGroup library, it still doesn't work.
Angular Datatables doesn't officially support RowGroup, but it was working before the upgrade. Here's a test case:
https://live.datatables.net/qixakufo/1/edit?html,css,js,console,output
The test case doesn't run properly. I would swap the order of the imports. Change:
to
This test case has rowGroup loading first and RowGroup doesn't work. Swap the .js load order and it will work:
https://live.datatables.net/lafazujo/1/edit
This suggests that RowGroup has a dependency on datatables.js loading first.
Kevin
Ive tried it both ways. Also, looking at the example you provided, it doesnt seem to be working there either, at least not for me
Sorry, I guess I wasn't clear on how to make the test case work. Here is the same example with the datatables.js and rowgroup.js lines swapped.
https://live.datatables.net/lafazujo/4/edit
Use the debugger to see if RowGroup is loaded on your page. Post your Datatables init code, maybe there is a typo your not seeing. Do you get errors in the browser's console?
Kevin