Issue
I want to create a button in typescript file using the html tags.I don't know how to add click event for that button i have created 2 action buttons wat to add the click event
"data": "img", "render": function (data) {
return '<button class="btn tblActnBtn" value= "Click" id="edit" (click)="onClickMe()" ><i class="material-icons">mode_edit</i></button><button class="btn tblActnBtn"><i class="material-icons">delete</i></button>'
}
Thanks,
Solution
self.testTable.on('click', 'input', function () {
var tr = $(this).closest('tr');
var row = self.testTable.row(tr);
var id = this.id;
var data = self.testTable.row(tr).data();
if (id == 'check') {
console.log("****",row.data())
}
});
It works for me.
Answered By - Priya
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.