用于Angular 2编辑行API问题的Kendo UI Grid

时间:2017-05-19 15:49:55

标签: javascript angular telerik kendo-ui-angular2

我有Kendo UI Angular 2网格,我想编辑,而不是整行,但是点击一个单元格。我该怎么做? 在文档here中描述了如何编辑整行。可能是我可以对单元格应用一些指令。像这样

<kendo-grid [data]="gridDataResult" [skip]="skip" [pageSize]="pageSize" [scrollable]="scrollable" [rowHeight]="rowHeight" [height]="height"
    (pageChange)="pageChange($event)" 
    (dataStateChange)="dataStateChange($event)"
    (edit)="editHandler($event)">
    <ng-template ngFor [ngForOf]="columns" let-column>
        <kendo-grid-column field="{{column.name}}" width="{{column.width}}" title = "{{column.title}}" editor ="{{column.editor}}">
            <ng-template kendoGridCellTemplate let-dataItem>
                  <div kendoGridEditCommand>{{dataItem[column.name]}}</div>
              </ng-template>
        </kendo-grid-column>
    </ng-template>
</kendo-grid>

但现在我在所有细胞中都有按钮。

0 个答案:

没有答案