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

Data attributes for creating kendo window

3 Answers 332 Views
Window
This is a migrated thread and some comments may be shown as answers.
tahmed
Top achievements
Rank 1
tahmed asked on 22 Feb 2013, 06:53 PM
Hi,
After reading the documentation on data attribute initialization, I tried to create a template for creating kendo window but none of the attributes are working. What's the proper way to initialize kendo window using data attributes?

Here is the template:
<script id="windowTemplate" type="text/x-kendo-template">
        <div id="#= Id#" data-width="400px" data-height="400px" data-modal="true" data-role="window" data-title="Title">
            Content
        </div>
    </script>

Thanks

3 Answers, 1 is accepted

Sort by
0
Accepted
Dimiter Madjarov
Telerik team
answered on 25 Feb 2013, 02:09 PM
Hello Sudhir,

After you have the markup for the widget, you should call kendo.init() method in order to initialize it. Please take a look at the following JS Bin example which demonstrates this.
 

Greetings,
Dimiter Madjarov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
tahmed
Top achievements
Rank 1
answered on 26 Feb 2013, 12:39 AM
Hi Dimiter,

Thanks! but everything works except for data-width and data-height. Are these two attributes not implemented?
0
Dimiter Madjarov
Telerik team
answered on 27 Feb 2013, 03:30 PM
Hi Sudhir,

Thank you for bringing this issue to our attention. I have log-ed the bug for our development team and it will be fixed in one of the next Kendo UI releases. I updated your points as a small sign of appreciation.

A workaround at the moment would be to set the width and the height in the CSS styles of the window div element - JS Bin.
 

Kind regards,
Dimiter Madjarov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Window
Asked by
tahmed
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
tahmed
Top achievements
Rank 1
Share this question
or