Issues with stylesheets using KendoWindow

3 posts, 1 answers
  1. Answer
    dccxz
    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?
    Thanks
  2. Dimo
    Admin
    Dimo avatar
    8332 posts

    Posted 20 Sep 2013 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. 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