<div e-columns>
….
<div e-column e-field="ShipCity" e-headertext="Ship City" e-textalign="left" e-width="90"></div>
<div e-column e-headertext="Manage Records" e-commands="command" e-isUnbound="true" e-width="130"></div>//command column
</div>
$scope.command = [
{ type: ej.Grid.UnboundType.Edit, buttonOptions: { text: "Edit" } },
{ type: ej.Grid.UnboundType.Delete, buttonOptions: { text: "Delete" } },
{ type: ej.Grid.UnboundType.Save, buttonOptions: { text: "Save" } },
{ type: ej.Grid.UnboundType.Cancel, buttonOptions: { text: "Cancel" } }
]; |
<script type="text/template"id="actionTemplate">
<a class="btn btn-warning" ng-click="$parent.editAngularRow(data.EmployeeID)">{{data.EmployeeID}}</a>
<a class="btn btn-danger" ng-click="$parent.delete(data.EmployeeID)">{{data.EmployeeID}}</a>
</script> |
$scope.editAngularRow = function (value) {//get the value from the template
var gridObj=$(".e-grid").ejGrid("instance");
var index= gridObj._selectedRow();//get the row index
} |