Multiple Tables and row Grouping

Multiple Tables and row Grouping

abbottmwabbottmw Posts: 29Questions: 0Answers: 0
edited July 2010 in General
I am trying to apply row grouping to multiple tables, and im getting errors.

http://www.datatables.net/examples/basic_init/multiple_tables.html

Message: 'aoData[...]._aData' is null or not an object

Im basically taking the multiple_tables.html example, and applying the row grouping from here

http://www.datatables.net/examples/advanced_init/row_grouping.html

When i change #example to .dataTable in the fnDrawCallback, i get the _aData is null error.

Is there more that i have to do to get this to work?

The page im initially trying to create will have n number of tables, so I apply a class to each table.

Any help is greatly appreciated.

-Matthew

Replies

  • gutzoftergutzofter Posts: 58Questions: 0Answers: 0
    Would be nice to see some code, HTML and JavaScript. If your tables do not have any s in their bodies, I believe you can run into this problem.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Assuming that you have basically copied the code form my example, I would guess that the key problem is this line of code:

    [code]
    var nTrs = $('#example tbody tr');
    [/code]
    That is obviously a table specific selector. A suitable solution would be:

    [code]
    var nTrs = $('tbody tr', oSettings.nTable);
    [/code]
    That should just allow it to all work...

    I'll update my example which that change.

    Allan
  • abbottmwabbottmw Posts: 29Questions: 0Answers: 0
    Sorry for not replying any sooner. I did grab the new 1.7 examples, and also made the slight mod Allan gave. I got the examples to work fine. I am working on putting it back with the original dynamic table page i was creating. If i have any more problems, ill repost.

    Thanks alot for all your help!

    -Matthew
This discussion has been closed.