multi-level-grouping
multi-level-grouping
huertoVerde
Posts: 24Questions: 7Answers: 0
in DataTables
Hello,
when im doing multlevel groping, all the second level gropus should be under the level one groping. Why is this not the case?
(see picture below) Handelmarketing should not bee between the BTL
ive tried ordering them but it dosnt work.
arbeitsTabelle = $('#arbeitsTabelle').DataTable({
retrieve: true,
paging: false,
info: false,
searching: true,
select:true,
stateSave: true,
order: [ ['verwendung', 'asc'] , ['detail', 'asc']],
rowGroup: {
dataSrc: [ 'verwendung', 'detail' ]
},
Answers
This doesn't seem correct. The
order
docs state that the column is the the numeric index. The docs don't state that a string is supported. Although it looks like its sorted by the correct columns. Based on the screenshots the grouping should be working and you shouldn't have twoBTL
groups. Please post a link to your page or a test case replicating the issue so we can help debug.https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
Hey im trying to do a test case,
live.datatables.net/nijupame/5/
i just copied the js from this example https://datatables.net/extensions/rowgroup/examples/initialisation/multipleGroups.html annd it is not working
so the problem in my project was that rowGroup does not work well with stateSave
Maybe you need to use
orderFixed
to always order by therowGroup.dataSrc
. Then stateSave shouldn't be a problem. If it please update the test case to show the issue.You test case didn't work because you added SearchBuilder, not RowGroup. You also need to make sure the libraries loaded are moved below the datatables.js include. See the updated example:
http://live.datatables.net/nijupame/6/edit
Note I added
order
to sort the table by therowGroup.dataSrc
.Kevin