Add row from one datatable to a different datatable

Add row from one datatable to a different datatable

joan0627joan0627 Posts: 3Questions: 1Answers: 0

Hello everyone who can help me with the following: I have a datatable and I want to select a row and obtain the data from it and then when pressing a button, pass the data of that row to another different datatable

This question has an accepted answers - jump to answer

Answers

  • joan0627joan0627 Posts: 3Questions: 1Answers: 0

    I want that when you click on the shopping cart button, that row with that data is added to the table that you see behind.

  • joan0627joan0627 Posts: 3Questions: 1Answers: 0

    And another problem I have is that the button id repeats itself and I get an error.

  • allanallan Posts: 52,724Questions: 1Answers: 8,070 Site admin

    To get the data from a row you would use the row().data() method. What does your current code look like, and what error(s) is it showing?

    Allan

  • kthorngrenkthorngren Posts: 10,721Questions: 25Answers: 2,449
    Answer ✓

    See if this example helps:
    http://live.datatables.net/xijecupo/1/edit

    Kevin

Sign In or Register to comment.