Row Grouping Code
Row Grouping Code
I am using the JQuery UI tabs and have a table for each tab.
Im also using the row grouping code shown here..
http://datatables.net/examples/advanced_init/row_grouping.html
I am having a time trying to get the row grouping to work on all the tables.
In the example it passes in the ID twice (#example).
[code]
oTable = $('#example').dataTable({
"fnDrawCallback": function ( oSettings ) {
..................
var nTrs = $('#example tbody tr');
...................
...................
}
});
[/code]
this was messing up my row grouping when i had two tables. I changed #example to be a class .dataTable in both places, but in doing so i was getting the columns from my other table in the second tab in the table of the first tab.
What i did to make it work is change the $('#example tbody tr') to be $('#'+oSettings.sTableId+' tbody tr');
and this seemed to make it work.
Is there another way to do this?
Thanks!
-Matthew
Im also using the row grouping code shown here..
http://datatables.net/examples/advanced_init/row_grouping.html
I am having a time trying to get the row grouping to work on all the tables.
In the example it passes in the ID twice (#example).
[code]
oTable = $('#example').dataTable({
"fnDrawCallback": function ( oSettings ) {
..................
var nTrs = $('#example tbody tr');
...................
...................
}
});
[/code]
this was messing up my row grouping when i had two tables. I changed #example to be a class .dataTable in both places, but in doing so i was getting the columns from my other table in the second tab in the table of the first tab.
What i did to make it work is change the $('#example tbody tr') to be $('#'+oSettings.sTableId+' tbody tr');
and this seemed to make it work.
Is there another way to do this?
Thanks!
-Matthew
This discussion has been closed.
Replies