Keep Child Rows open on Draw
Keep Child Rows open on Draw

Hello,
I know this question have been up hundreds of times.
I have read almost every topic on the Internet, but I can't still get it to work.
I have enabled Responsive and as such some columns are hidden when the screen size is to small to fit them all.
When I select to show these columns with the plus sign, a child row is beeing open.
When the table reloads (a draw is done every 15 seconds), all open child rows closes.
I have found this:
https://datatables.net/forums/discussion/29199/how-can-i-keep-child-rows-opened-after-the-ajax-reload
The problem is that I don't think that is applicable to Responsive as that solution seems to need a static content (and not depending on the columns actually hidden).
I have also found this:
https://datatables.net/forums/discussion/43577/rows-close-when-ajax-updates
Stating (I think) that Responsive should actually take care of it by it-self.
That is not the case for me (running the latest version of DataTables and Responsive as of today).
I have the following enabled:
"responsive": true,
"stateSave": true,
I have run the debugging tool and it reports no failures or warnings.
What am I missing?
Regards,
Lucas
This question has an accepted answers - jump to answer
Answers
I believe Responsive will automatically reopen the rows. But you need to have a row ID assigned to the rows. You can use the
rowId
option for this if you have a unique column.Kevin
Many tahnks for your reply!
I was finnaly able to solve it by simply adding
"rowId": "id"