In the below code I'm trying to put a button (icon) in the cell(column) and trigger page location change on the Controller. I cannot seem to get "data" in the .click function on line 22. New in this arena so info help is appreciated.
columnDefs: [
{
className: 'control responsive',
orderable: false,
render: function () {
return '';
},
targets: 0
},
{
targets: 1,
data: null,
orderable: false,
defaultContent: '',
rowAction: {
element: $("<div/>")
.addClass("text-center")
.append($("<button/>")
.addClass("btn btn-outline-primary btn-sm btn-icon")
.attr("title", app.localize("Open Document"))
.append($("<i/>").addClass("la la-search"))
).click(function (data) {
document.location.href = abp.appPath + "App/CustomersAndAccounts/ViewCustomerDetail?id=1";
})
}
},