Row Grouping Code

Row Grouping Code

abbottmwabbottmw Posts: 29Questions: 0Answers: 0
edited May 2010 in General
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

Replies

  • abbottmwabbottmw Posts: 29Questions: 0Answers: 0
    Okay this is not working right. Adding the oSettings.sTableId makes it where i can sort the tables, just fine, but the fnFilter() method only works for the table in tab 1, not the table in tab 2.
This discussion has been closed.