I am utilizing the dxDataGrid
user interface widget from the Devextreme product.
My goal is to transform one of its columns into a clickable button. Here is my progress so far:
Field Configuration
{ dataField: 'LetterNumber', caption: 'Letter Number', cellTemplate: showLetterImageTemplate }
CellTemplate Setup for Button Display
function showLetterImageTemplate (cellElement, cellInfo) {
cellElement.html(' <button class="btn btn-info btn-sm btn-block" ng-click="show('+cellInfo+')">' + cellInfo.displayValue + ' </button> ');
$compile(cellElement)($scope);
};
Function Triggered by Button Click
$scope.show = function (cellInfo) {
DevExpress.ui.notify("TEST" + cellInfo.data, "error", 2000);
}
The issue I am facing is with passing the data of the clicked row to the Show()
function to identify the specific row. When I click the button, it throws the following error:
ng-click=Show([Object Object])
For information, I am integrating Angular into my UI framework.