Issues with stylesheets using KendoWindow

3 posts, 1 answers
  1. Answer
    dccxz avatar
    25 posts
    Member since:
    Jun 2007

    Posted 19 Sep 2013 Link to this post

    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?
  2. Dimo
    Dimo avatar
    8404 posts

    Posted 20 Sep 2013 Link to this post

    Hello Ivan,

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

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

    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.

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. dccxz
    dccxz avatar
    25 posts
    Member since:
    Jun 2007

    Posted 20 Sep 2013 Link to this post

    Thank you Dimo!
    Could not ask for a better answer!
Back to Top