In Angular UI-Grid table, I have one date column (referenceDate) which I want to enable/disable edit based of a flag called 'allowed' which is part of the row value.
How to pass this row value in 'enableCellEdit' attribute ?
Here is my code fragment. I tried with 'row.entity.allowed' but it did not worked. And got error Error: row is not defined
$scope.gridOptions.columnDefs = [
{
field : "referenceDate", width : "15%", enableCellEdit: row.entity.allowed, type: 'date', cellFilter: 'date:"yyyy-MM-dd"',
},
{
field : "manuallyUpdated", width : "10%", cellEditableCondition: false, cellTemplate: '<input type="checkbox" ng-model="row.entity.manuallyUpdated" disabled="true" style="zoom:1.5" >'
}
];
JSON data
{
"referenceDate": "2015-09-30",
"allowed": true,
"manuallyUpdated": true
}