Tell dataTable() which table rows to parse?!

Tell dataTable() which table rows to parse?!

lnaielnaie Posts: 2Questions: 0Answers: 0
edited June 2012 in General
Hi,

I'm looking for a mechanism (at intialization or rendering time) to tell dataTable object which of the html table tr rows to take into account on rendering. Basically one dataTable logical row will map to a couple of rows. Or at least to map only to some of them, the others being skipped but controlled later manually: to collapse/expand or maybe init any other inner table, etc.
Possible something such as fnRowCallback or fnDrawCallback or a css class that will tell dataTable to parse only the flagged rows.

Is there such an easy way of achieving this?

Replies

  • koosvdkolkkoosvdkolk Posts: 169Questions: 0Answers: 0
    Could you please tell us what goal you would like to achieve in the end?

    I am not sure, but I suspect that is not possible to let DataTables just skip some rows of a HTML table while rendering, because this would mess up all kinds of internal variables. For example, the variable 'number of rows in datatable': Is this all rows, or only the rows being rendered?
  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    As @koosvdkolk suggests you can't have some rows ignored in DataTables. For example, what you happen when sorting, or filtering the table?

    Allan
  • lnaielnaie Posts: 2Questions: 0Answers: 0
    Sorting or filtering it's a good reason not to do this.
    But then the table row should include another table that will have the fancy layout I need.
    Thx
This discussion has been closed.