Kendo UI Grid dataSource schema model fields - add custom attributes to fields

2 posts, 0 answers
  1. Rasika
    Rasika avatar
    18 posts
    Member since:
    Jul 2015

    Posted 20 Aug 2015 Link to this post

    I want to add custom attributes to model fields.

    Think can I add data-email-msg as attribute to a field in Kendo Grid.(Please look at my example and how I add it..)

    here is a example.....


         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" }] }); 


    I already know that above is wrong. I am asking, is there a way to do that ??
  2. Viktor Tachev
    Viktor Tachev avatar
    2469 posts

    Posted 21 Aug 2015 Link to this post

    Hi Rasika,

    The approach you are using for adding attributes to the grid columns looks correct. It is also described in the documentation:

    Viktor Tachev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top