添加新行 编辑 {{ 是新的 ? '添加':'更新'}}
<button kendoGridRemoveCommand class="k-primary" tabindex="26">
Delete
</button>
<br /><br />
<button kendoGridCancelCommand class="k-primary" (click)="onCancel()" tabindex="27">{{ isNew ? 'Cancel' : 'Cancel' }}</button>
</ng-template>
</kendo-grid-command-column>
答案 0 :(得分:0)
您可以使用NgIf指令,如下所示:
<div *ngIf="dataInTheGrid; then thenBlock else elseBlock"></div>
<ng-template #thenBlock>Content to render when condition is true.</ng-template>
<ng-template #elseBlock>Content to render when condition is false.</ng-template>
有类似的东西
<div *ngIf="dataInTheGrid; then thenBlock else elseBlock"></div>
<ng-template #thenBlock>
<kendo-grid-command-column>
<button kendoGridRemoveCommand class="k-primary" tabindex="26">Delete</button>
<br /><br />
<button kendoGridCancelCommand class="k-primary" (click)="onCancel()" tabindex="27">Update</button>
</kendo-grid-command-column>
</ng-template>
<ng-template #elseBlock>
<kendo-grid-command-column>
<button kendoGridCancelCommand class="k-primary" (click)="onCancel()"
tabindex="27">Add new Row</button>
</kendo-grid-command-column>
</ng-template>