Created
April 8, 2017 04:39
-
-
Save A2H111/28d36aa6dda74309599c64fcbafbd33e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
columnDefs: [ | |
{ | |
name: "CustomerID", displayName: "Customer ID", field: "CustomerID", | |
cellTemplate: '<div ng-if="!row.entity.editrow">{{COL_FIELD}}</div><div ng-if="row.entity.editrow"><input type="text" style="height:30px" ng-model="MODEL_COL_FIELD"</div>', width: 80 | |
}, | |
{ | |
name: "CompanyName", displayName: "Company Name", field: "CompanyName", | |
cellTemplate: '<div ng-if="!row.entity.editrow">{{COL_FIELD}}</div><div ng-if="row.entity.editrow"><input type="text" style="height:30px" ng-model="MODEL_COL_FIELD"</div>', width: 200 | |
}, | |
{ | |
name: "ContactName", displayName: "Contact Name", field: "ContactName", | |
cellTemplate: '<div ng-if="!row.entity.editrow">{{COL_FIELD}}</div><div ng-if="row.entity.editrow"><input type="text" style="height:30px" ng-model="MODEL_COL_FIELD"</div>', width: 140 | |
}, | |
{ | |
name: "ContactTitle", displayName: "Contact Title", field: "ContactTitle", | |
cellTemplate: '<div ng-if="!row.entity.editrow">{{COL_FIELD}}</div><div ng-if="row.entity.editrow"><input type="text" style="height:30px" ng-model="MODEL_COL_FIELD"</div>', width: 140 | |
}, | |
{ | |
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 | |
'</div>', width: 100 | |
} | |
], |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment