Skip to content

Instantly share code, notes, and snippets.

@A2H111
Created May 13, 2017 03:51
Show Gist options
  • Save A2H111/e5c7ba5d392728fa6593553b4ed1c509 to your computer and use it in GitHub Desktop.
Save A2H111/e5c7ba5d392728fa6593553b4ed1c509 to your computer and use it in GitHub Desktop.
{
name: 'Actions', field: 'edit', enableFiltering: false, enableSorting: false,
cellTemplate: '<div><button ng-show="!row.entity.editrow" class="btn primary" ng-click="grid.appScope.edit(row.entity)"><i class="fa fa-edit"></i></button>' + //Edit Button
'<button ng-show="row.entity.editrow" class="btn primary" ng-click="grid.appScope.saveRow(row.entity)"><i class="fa fa-floppy-o"></i></button>' +//Save Button
'<button ng-show="row.entity.editrow" class="btn primary" ng-click="grid.appScope.cancelEdit(row.entity)"><i class="fa fa-times"></i></button>' + //Cancel Button
'<button ng-show="!row.entity.editrow" class="btn primary" ng-click="grid.appScope.deleteRow(row.entity)"><i class="fa fa-trash-o"></i></button>' +//Delete Button
'</div>', width: 100
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment