我正在使用带有Angular 2的Kendo Grid.如果没有数据,那么我将获得No records available消息,这是Kendo Grid附带的默认消息.我想自定义消息.我试过[NoRecords] = {“Some message”};里面的KendoGrid html标签,但它无法正常工作.
解决方法
这可以通过将kendo-grid-message组件嵌套在kendo-grid中来实现.
<kendo-grid [data]="[]"> <kendo-grid-messages noRecords="There are no items to display."> </kendo-grid-messages> </kendo-grid>
确保使用正确的输入大写(camel case).
有关该主题的更深入描述,请参阅globalization documentation .
可以在here找到kendo-grid-messages组件的可用输入列表.