This is a migrated thread and some comments may be shown as answers.

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

1 Answer 260 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rasika
Top achievements
Rank 1
Rasika asked on 20 Aug 2015, 07:32 AM

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.....

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

 

I already know that above is wrong. I am asking, is there a way to do that ??

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 21 Aug 2015, 01:36 PM
Hi Rasika,

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



Regards,
Viktor Tachev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Rasika
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or