Add a new column inside aoColumns

Add a new column inside aoColumns

Ak24Ak24 Posts: 1Questions: 1Answers: 0

Hello DataTable developers,

How to add a column for edit operation on each row with html button?

My code is as below:

aoColumns: [
{ "sTitle": "Name", "mData": "Name" },
{ "sTitle": "Surname", "mData": "Surname" },
{ "sTitle": "Designation", "mData": "Desig" },
{ "sTitle": "City", "mData": "City" }
]

Thanks,
Ak

Answers

  • kthorngrenkthorngren Posts: 21,336Questions: 26Answers: 4,953
    edited July 2023

    See this Editor example. If you are not using the Editor (you really should as it will make this easier) then replace the editor.edit() and editor.remove() calls with your own editing code.

    Kevin

Sign In or Register to comment.