Hi i am trying to avoid name duplication's in angular ui grid.
$scope.gridOptions.columnDefs = [
{ name: 'id', width: '25%' },
{ field: 'name',
displayName: 'Name',
width: '25%',
height:'auto',
'cellTemplate':'<div><input type="text" ng-class="{error:grid.appScope.hasError(row.entity)}" ng-change="grid.appScope.objectHasChanged(row.entity)" ng-input="row.entity.name" ng-model="row.entity.name" /><div class="errorspan" ng-show="grid.appScope.hasError(row.entity)" >Error in field</div></div>'
},
{ name: 'gender', displayName: 'Gender', editableCellTemplate: 'ui-grid/dropdownEditor', width: '20%',
cellFilter: 'mapGender', editDropdownValueLabel: 'gender', editDropdownOptionsArray:
[
{ id: 1, gender: 'Male' },
{ id: 2, gender: 'Female' }
]
},
{
field: 'status',
cellTemplate: '<div ng-if="row.entity.status == 0">Active</div><div ng-if="row.entity.status == 1">InActive</div>'
}
];
Here is my plunker: http://plnkr.co/edit/PlUfwRGEezYQVMpXmiIr?p=preview
Problem is with its opening all the other rows as well.
What am i doing wrong? Is there any way to update only to the particular row?