kendo ui grid cell empty message

时间:2018-05-27 17:58:06

标签: kendo-ui kendo-ui-grid

如果网格dataSource中缺少单元格的数据,则输出未定义/为null,具体取决于单元格类型String / Number。 我还没有找到为空单元格指定默认消息的方法。

字段:"标题",

标题:"标题",

模板:"#:UnitPrice#",

noDataMessage:" noData ...",

宽度:"自动",

有没有办法为空单元格存储标准消息,比如noDataMessage?

我的小样本代码:https://dojo.telerik.com/AKInuYEG/2

数据集Ikura没有UnitPrice,因此空单元格的输出为null

1 个答案:

答案 0 :(得分:2)

据我所知,没有像" NoDataMessage"这样的单元格/列的配置,所以你应该在模板中检查你的属性为null:

template: "<div class=\'priceTempl\'>#: UnitPrice != null ?  UnitPrice : 'No data'#</div>"