modal popup window
modal popup window
екатерина
Posts: 9Questions: 3Answers: 0
hello , I am using this example http://live.datatables.net/tekurocu/1/edit my task . It is necessary that on clicking on a cell a modal pop-up window opens, as in the example, but without using ajax is it possible to do this somehow?
Answers
You didn't says what you want to happen. I'm guess you want to show the row clicked on, like this example:
http://live.datatables.net/tekurocu/2/edit
Get the row data using
rows().data()
with therow-selector
of the closesttr
. Usedata
to add the row data to the table. Userows()
instead ofrow()
to get an array of rows, even though its only 1 row, asdata
expects an array of rows.If this doesn't help please provide details of what you are looking for.
Kevin
I need to open a new table in a modal window. I already have a DataTable with a child table, I need to open another new table when clicking on a cell from the main table
http://live.datatables.net/tekurocu/3/edit - my code
You can use a click event, similar to this example, using tdt` as part of the selector. You can use the Bootstrap modal() API to show the modal. Not sure what you want to show in the new table in the modal but the example, I linked shows how to get the data from the row clicked.
Kevin