Expandable/collapsible rows with multiple tbody tags

Expandable/collapsible rows with multiple tbody tags

vntzyvntzy Posts: 2Questions: 0Answers: 0

Hello,

I'm having a problem with a jQuery Datatable and will be pleased to have your help. The problem is that I have a table where each row of the table should be grouped with some child rows which are expandable/collapsible. So I grouped the main row with its child rows in a tbody tag, but this way the sorting is messed up. I saw from a discussion here http://datatables.net/forums/discussion/1296/multiple-tbody-tags that there's a function _fnGatherData where I can say that I want all my rolls from all my tbody tags, but I can't see how exactly will I do that and is that function still used in the newest datatables ? Can you give me a example, please ? Or maybe there's a better way to do this ?

Thanks in advance.

Replies

  • vntzyvntzy Posts: 2Questions: 0Answers: 0

    I figured out a way by myself - my main table has only one tbody, where each row has hidden columns with the data needed to sort and only one column isn't hidden which is a new table, in which the thead is the main row and the tbody is collapsible sub-rows. Very ugly and strange solution but it works

This discussion has been closed.