Responsive modal header

Responsive modal header

JereJere Posts: 2Questions: 1Answers: 0

How do you display header text in a responsive modal header with a cell value of a dynamically created datatable?

This is great for an already created HTML

display: $.fn.dataTable.Responsive.display.modal({ header: function (row) { var data = row.data(); return 'Details for ' + data[2]; } })

But my datatable is dynamically created and I need to display the text/value of a certain cell.

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    I'm not quite following. We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • JereJere Posts: 2Questions: 1Answers: 0

    How do I do a test case when the datatable is dynamically generated from an ajax call to a database. I can show what the datatable should look like if it was hard coded HTML but then it will not be an accurate representation of what I need or doing.

  • kthorngrenkthorngren Posts: 21,171Questions: 26Answers: 4,922

    Take a sample of the Ajax response and use data to add it as Javascript sourced data. Like this example.

    Kevin

This discussion has been closed.