How to make some column to have [Edit][Delete] buttons and perform function accordingly?
How to make some column to have [Edit][Delete] buttons and perform function accordingly?
caotunspring
Posts: 5Questions: 3Answers: 0
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem: Able to perform server side to get records and show on html, additionally need to have action on row basis as well, to edit and to delete
This question has accepted answers - jump to:
Answers
Are you using Editor for this? If so see this example.
IF not this example shows how to create buttons and event handlers for them to get the data:
http://live.datatables.net/xijecupo/1/edit
Kevin
Yes, I got the idea. Thanks a lot!
It shows the two buttons.
Next, how to get selected row's data for that button to perform js function?
There are two event handlers in the example, one for each button that gets the data For example:
Also this example might help. Yo will want to understand jQuery delegated events.
Kevin
Thanks a lot!
For my case, I need to get Id from selected row.
Follow sample style,
It works!