使用 Kendo 工具栏和 kendo 工具栏按钮在 Kendo 网格中添加自定义按钮
Addition of Custom button in Kendo Grid using Kendotoolbar and kendo toolbar button
我正在设置一个带有 kendo 网格的页面,其中包含 kendo 工具栏和 kendo 工具栏按钮,所有我需要生成的自定义按钮都有助于生成 excel 报告、邮寄等。问题是 kendo 网格和 kendo 工具栏单独工作,但在下面的代码中没有一起工作(只有 kendo 网格可见)。使用 ng add @progress/kendo-angular-toolbar 添加工具栏
grid.component.html
<kendo-grid [data]="records"
[pageSize]="state.take"
[skip]="state.skip"
[sort]="state.sort"
[sortable]="true"
[pageable]="true"
[scrollable]="'scrollable'"
[groupable]="false"
[group]="state.group"
[filterable]="true"
[filter]="state.filter"
(dataStateChange)="dataStateChange($event)"
[selectable]="true"
(selectionChange)="gridUserSelectionChange(gridUser, $event)"
(dblclick)='onDblClick()'
[height]="500"
(edit)="editHandler($event)"
(remove)="removeHandler($event)">
<kendo-grid-command-column title="command" width="200">
<ng-template kendoGridCellTemplate>
<button mat-button kendoGridEditCommand><mat-icon >edit</mat-icon></button>
<button mat-button kendoGridRemoveCommand><mat-icon >delete</mat-icon></button>
</ng-template>
</kendo-grid-command-column>
<kendo-grid-column
*ngFor="let column of columns"
field={{column}} title="{{column}}" ></kendo-grid-column>
<kendo-toolbar>
<kendo-toolbar-button [text]="'Edit'"
[showText]="'both'"
[icon]="'edit'"
[showIcon]="'both'"
[primary]="true"
[look]="look"
[disabled]="false"
[tabIndex]="tabIndex"
></kendo-toolbar-button>
</kendo-toolbar>
</kendo-grid>
上面的代码是有效的,在我添加了安装工具栏的命令之后
添加 @progress/kendo-angular-toolbar;
请参考 link: enter link description here 了解更多信息。谢谢
我正在设置一个带有 kendo 网格的页面,其中包含 kendo 工具栏和 kendo 工具栏按钮,所有我需要生成的自定义按钮都有助于生成 excel 报告、邮寄等。问题是 kendo 网格和 kendo 工具栏单独工作,但在下面的代码中没有一起工作(只有 kendo 网格可见)。使用 ng add @progress/kendo-angular-toolbar 添加工具栏
grid.component.html
<kendo-grid [data]="records"
[pageSize]="state.take"
[skip]="state.skip"
[sort]="state.sort"
[sortable]="true"
[pageable]="true"
[scrollable]="'scrollable'"
[groupable]="false"
[group]="state.group"
[filterable]="true"
[filter]="state.filter"
(dataStateChange)="dataStateChange($event)"
[selectable]="true"
(selectionChange)="gridUserSelectionChange(gridUser, $event)"
(dblclick)='onDblClick()'
[height]="500"
(edit)="editHandler($event)"
(remove)="removeHandler($event)">
<kendo-grid-command-column title="command" width="200">
<ng-template kendoGridCellTemplate>
<button mat-button kendoGridEditCommand><mat-icon >edit</mat-icon></button>
<button mat-button kendoGridRemoveCommand><mat-icon >delete</mat-icon></button>
</ng-template>
</kendo-grid-command-column>
<kendo-grid-column
*ngFor="let column of columns"
field={{column}} title="{{column}}" ></kendo-grid-column>
<kendo-toolbar>
<kendo-toolbar-button [text]="'Edit'"
[showText]="'both'"
[icon]="'edit'"
[showIcon]="'both'"
[primary]="true"
[look]="look"
[disabled]="false"
[tabIndex]="tabIndex"
></kendo-toolbar-button>
</kendo-toolbar>
</kendo-grid>
上面的代码是有效的,在我添加了安装工具栏的命令之后 添加 @progress/kendo-angular-toolbar; 请参考 link: enter link description here 了解更多信息。谢谢