angular.module('listCtrl', ['ejangular'])
.controller('PhoneListCtrl', function ($scope) {
$scope.data = obj;
$scope.actionComplete = function (args) {
if ((args.requestType == "beginedit" || args.requestType == "add") && args.model.editSettings.editMode == "inlineformtemplate") {
$("#applicationId").ejAutocomplete({
fields: { text: "name", key: "applicationId" },
dataSource: autoData
}).ejAutocomplete("selectValueByKey", $("#applicationId").val());;
if (args.requestType == "beginedit") {
$("#applicationId").ejAutocomplete({ enabled: false });
}
}
};
$scope.edit= { allowEditing: true, allowAdding: true, allowDeleting: true, editMode: "inlineformtemplate", inlineFormTemplateID: "#template" },
$scope.tools = { showToolbar: true, toolbarItems: [ej.Grid.ToolBarItems.Add, ej.Grid.ToolBarItems.Edit, ej.Grid.ToolBarItems.Delete, ej.Grid.ToolBarItems.Update, ej.Grid.ToolBarItems.Cancel] };
});
<script id="template" type="text/template">
<b>Order Details</b>
<table cellspacing="10">
<tr>
<td style="text-align: right;">
App ID
</td>
<td style="text-align: left">
<input id="applicationId" name="applicationId" value="{{: applicationId}}" disabled="disabled" class="e-field e-ejinputtext valid e-disable" />
</td>
. . . .
. ..
</tr>
..
</table>
</script> |