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

Issues with stylesheets using KendoWindow

2 Answers 33 Views
Window
This is a migrated thread and some comments may be shown as answers.
dccxz
Top achievements
Rank 1
dccxz asked on 19 Sep 2013, 02:29 PM
I have a kendoWindow that loads a page with some Telerik controls.
RadFormDecorator is used on the loaded pages and main page where KendoWindow is defined.
But when content is loaded (via .refresh(url) method) - all the styling applied by RadFormDecorator disappear almost right away and get overwritten to default browser style.
Such behavior does not exist if KendoWindow is not used. It's almost like it resets styles as it loads content.
Is there any way to address this?
Thanks

2 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 20 Sep 2013, 11:17 AM
Hello Ivan,

RadFormDecorator is able to decorate page content, which is refreshed with AJAX...

http://demos.telerik.com/aspnet-ajax/formdecorator/examples/partialpageupdates/defaultcs.aspx

...but only when the page content update is made with the Microsoft Ajax framework (via the PageRequestManager client object etc). Of course, the Kendo UI Window does not rely on MS AJAX, so it does not perform AJAX requests via the PageRequestManager.

A possible approach in your case is to use the Kendo UI Window's refresh event and execute the RadFormDecorator's decorate() client method.

http://docs.kendoui.com/api/web/window#events-refresh

http://www.telerik.com/help/aspnet-ajax/formdecorator-client-side-api.html

Another possible approach is to use the appendTo option of the Window and force the widget to be created exactly where you have placed it - this will be somewhere inside the ASP.NET form, while normally the Window would be moved in the DOM to become a child of the <body>, i.e. outside the <form>. Then, use an UpdatePanel inside the Window content and trigger updates via the UpdatePanel and not via the Kendo UI Window API.

http://docs.kendoui.com/api/web/window#configuration-appendTo

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
dccxz
Top achievements
Rank 1
answered on 20 Sep 2013, 11:58 AM
Thank you Dimo!
Could not ask for a better answer!
Tags
Window
Asked by
dccxz
Top achievements
Rank 1
Answers by
Dimo
Telerik team
dccxz
Top achievements
Rank 1
Share this question
or