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

Data attribute initialization

2 Answers 87 Views
Grid
This is a migrated thread and some comments may be shown as answers.
RES
Top achievements
Rank 1
RES asked on 06 May 2014, 12:10 AM
I'd like to set the following Grid property via data attribute initialization.

http://docs.telerik.com/kendo-ui/api/web/grid#configuration-pageable.messages.display

So I've added the following attribute but it doesn't seem to work.

data-pageable="messages: { display: 'Showing {0}-{1} of {2} leads' }"

Is it possible to set this property via attributes?

2 Answers, 1 is accepted

Sort by
0
Accepted
Rosen
Telerik team
answered on 07 May 2014, 08:34 AM
Hello,

I'm afraid that I'm unable to observe such behavior locally. Please take a look at the following test page. Maybe I'm missing something obvious.

Regards,
Rosen
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
RES
Top achievements
Rank 1
answered on 07 May 2014, 09:42 PM
Ahh good example.  You have your attribute value wrapped in curly brackets like this.

data-pageable="{messages:{display:'Showing {0}-{1} of {2} leads' }}"

Where as I have mine without the outer curly brackets.

data-pageable="messages:{display:'Showing {0}-{1} of {2} leads' }"

This fixes my problem, thanks.
Tags
Grid
Asked by
RES
Top achievements
Rank 1
Answers by
Rosen
Telerik team
RES
Top achievements
Rank 1
Share this question
or