Hey there! I'm diving into the world of angular and angular ui-grid. I've set up my project using angularjs(v1.4) with angular-ui-grid(v3.0.7).
Here's how I've defined my grid:
seec.gridOptions = {};
seec.gridOptions.rowEditWaitInterval = -1;
seec.gridOptions.onRegisterApi = function (gridApi) {
$scope.gridApi = gridApi;
gridApi.rowEdit.on.saveRow($scope, $scope.saveRow);
};
seec.gridOptions.columnDefs = [
{name: 'pouch', displayName: 'Pouch', enableCellEdit: false, enableHiding: false, width: 250},
{name: 'content', displayName: 'Content', enableHiding: false, width: 150},
{
name: 'units',
displayName: 'Number of Items',
type: 'number',
enableHiding: false,
width: 150
},
{name: 'active', displayName: 'Status', type: 'boolean', enableHiding: false, width: 150}
];
The controller fetches data from an http call and populates the grid.
if (response.status === 200) {
seec.gridOptions.data = angular.copy(seec.data);
}
Currently, the boolean values in the grid are displayed as 'true' or 'false', with a checkbox appearing when double-clicked.
I want to show 'active' for true and 'inactive' for false. Is there a way to achieve this in angular ui-grid?