angular - 在 kendo-grid 中添加新条目时发生错误
问题描述
在剑道网格中添加新条目时遇到问题。数据正在保存,但出现如下错误:
编辑指令的默认编辑服务仅在绑定到普通数组时有效。请提供编辑服务。
甚至谷歌也无法对此给出任何答案。
以下是我的html:
<kendo-grid-command-column width="70">
<ng-template kendoGridCellTemplate let-isNew="isNew" let-dataItem="dataItem">
<button kendoGridEditCommand type="button" [disabled]="HasProcessed" (click)="editCustomDednDetails(dataItem)" [primary]="true">
<img src="/FinTechApp/assets/images/ico_edit.png">
</button>
<button type="button" kendoGridRemoveCommand [disabled]="HasProcessed" *ngIf="!dataItem.IsInEditMode" (click)="fnDeletecustomdeductionDetails(dataItem.EmpMonthlyCustomDeductionDetailsId)">
<img src="/FinTechApp/assets/images/ico_delete.png">
</button>
<button kendoGridSaveCommand type="button" (click)="fnUpdateEmpCustomDednDetails(dataItem)">
{{ isNew ? '' : '' }}
<img src="/FinTechApp/assets/images/ico_save.png" title="Add">
</button>
<button kendoGridCancelCommand type="button">
{{ isNew ? '' : '' }}
<img src="/FinTechApp/assets/images/ico_cancel.png" title="Cancel">
</button>
</ng-template>
</kendo-grid-command-column>
下面是我正在使用的编辑按钮命令:
editCustomDednDetails(data) {
var CustomDeductionObj: CustomDeduction = data;
CustomDeductionObj.IsInEditMode = true;
this.SelectedDedHead = new DeductionHeads();
this.SelectedDedHead.DeductionHeadId = data.DeductionHeadId;
this.finTechService.OperationType = PageAccessType.Edit;
}
随时问任何问题。我真的是一团糟。
提前致谢
解决方案
推荐阅读
- sql - typeorm:如何正确使用 IsNotNull/IsNull?
- bash - bash管道输出到文件按一定的时间间隔
- c# - 为什么我部署的应用程序仍在读取 cshtml 视图而不是预编译视图
- android - 如何使 RecyclerView 的 ItemTouchHelper 仅在列表的一部分上工作(拖放)
- postgresql - 如何在 PostgreSQL 中设置触发器?
- python - 每次我运行代码时,LDA 主题建模都会更改结果
- oracle - 您可以在 Oracle PL/SQL 的过程中使用对象类型吗?
- arduino - 移动时跟踪 Zaber 设备的位置
- python - Selenium Webdriver:在写入时出现确定字符后按下某个键
- shell - 如何避免在sql plus下使用shell脚本运行一系列命令