Responsive clashes with Row Details
Responsive clashes with Row Details
pjustindaryll
Posts: 13Questions: 4Answers: 0
Hi Team,
May I ask if it is possible to use Responsive and Row Details at the same time?
I'm using this as an example for row details.
https://datatables.net/examples/server_side/row_details.html
And, I'm using this for responsive function.
https://datatables.net/extensions/responsive/examples/child-rows/custom-renderer.html
Is there a way to use these two without clashing into one another?
This question has an accepted answers - jump to answer
Answers
Yes, if you have it setup like that then you have two different aspects of the program trying to control the child rows, so it will of course clash.
You need to take a different approach for one of them. For example with Responsive you could have it display the hidden details in a modal. Or you could have your details view in a modal, or another panel or something else. But you do need to separate the two.
Allan
Thank you Allan, I managed to separate the Row Details and the Responsive.
Can we use https://datatables.net/extensions/responsive/examples/display-types/modal.html to load headers from AJAX? I can't seem to make it work.
Thank you.
Not sure what you mean I'm afraid. The table headers to show in the modal? If so, then no - I'm afraid not. The Responsive modal will just show the content of the table header / columns for the row in question. If you wanted something more complete, like Ajax loading the data to show in the modal, then you'd need to fire up a different modal and populate it's content as needed.
Allan
I'll go with your suggestion. Thank you.