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

  • kthorngrenkthorngren Posts: 21,344Questions: 26Answers: 4,954

    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 the row-selector of the closest tr. Use data to add the row data to the table. Use rows() instead of row() to get an array of rows, even though its only 1 row, as data expects an array of rows.

    If this doesn't help please provide details of what you are looking for.

    Kevin

  • екатеринаекатерина Posts: 9Questions: 3Answers: 0

    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

  • kthorngrenkthorngren Posts: 21,344Questions: 26Answers: 4,954

    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

Sign In or Register to comment.