Adding Custom Actions on column
Adding Custom Actions on column
kvn9328
Posts: 18Questions: 7Answers: 0
Hi,
I am trying to achieve something like this using datatables jquery:
$("#pagination").dataTable({
"processing":true,
"serverSide":true,
"ordering":false,
"searching":false,
"ajax":{
"url":"pagination.html"},
"columns":[{"data":"name"},{"data":"alias"}]
});
<table id="pagination">
<thead>
<tr>
<th>Name</th>
<th>Alias</th>
<th>Options</th>
</tr>
</thead>
</table>
I will populate Name and Alias columns from the datasource of datatable, but the Options column should contain action itmes like:
view, update, delete on click events, which will perform according actions.
How could i achieve this?
I am new to front end development, any sample snipped code would help me understand.
Thanks!
This discussion has been closed.
Answers
Update,
I was able to add customized data to column and can perform action on the click:
So, now i should be able to add custom html as a data for botton:
custom html would look like:
I was able to solve the above problem by using ColumnDef.render feature.