【问题标题】:Kendo UI Grid dataSource schema model fields - add custom attributes to fieldsKendo UI Grid 数据源模式模型字段 - 向字段添加自定义属性
【发布时间】:2015-08-20 07:07:16
【问题描述】:

我想向模型字段添加自定义属性。想我可以将data-email-msg 作为属性添加到Kendo Grid 中的字段。(请查看我的示例以及如何添加它..)

这是一个例子.....

$("#grid").kendoGrid({
  columns: [ {
    field: "name",
    title: "Name",
    attributes: {
      "class": "table-cell",
      style: "text-align: right; font-size: 14px",
      data-email-msg : "enter a valid email massage"
    }
  } ],
  dataSource: [ { name: "Jane Doe" }, { name: "John Doe" }]
});

我已经知道上面是错误的。我在问,有没有办法做到这一点??

【问题讨论】:

    标签: kendo-ui telerik kendo-grid kendo-datasource kendo-validator


    【解决方案1】:

    data-email-msg 放在引号中,例如"data-email-msg"

    【讨论】:

    • 我刚看到 class 用引号括起来,决定也试试data-email-msg ;)
    • 看到你的回答后,我突然想到了......谢谢兄弟
    猜你喜欢
    • 1970-01-01
    • 2012-10-13
    • 2022-01-24
    • 1970-01-01
    • 1970-01-01
    • 2016-02-01
    • 2014-04-02
    • 2012-06-09
    • 2013-07-30
    相关资源
    最近更新 更多