Load content only when RadWindow is opene

2 posts, 0 answers
  1. Mohamed
    Mohamed avatar
    1 posts
    Member since:
    May 2014

    Posted 24 Nov 2015 Link to this post

    I have a RadWindow that contains a User Control. This user control is doing a lot of processing on load. The initial state of the RadWindow is minimized.


    I want the RadWindow to NOT load the UserControl inside it when the page is initially opened. I want the user control to be loaded only when I open the RadWindow.

  2. Marin Bratanov
    Marin Bratanov avatar
    3558 posts

    Posted 24 Nov 2015 Link to this post

    Hi Mohamed,

    You can use the OnClientShow event to initiate and AJAX request to show the user control (e.g., set its Visible property to true). This article will show you how to use the ContentTemplate of a RadWindow with AJAX: http://docs.telerik.com/devtools/aspnet-ajax/controls/window/how-to/how-to-use-radwindow-with-ajax.

    Your other option (the easier, in my opinion), is to load an entire aspx page in the RadWIndow. It will load it only when shown initially if it is set via the NavigateUrl property. If you do not specify it, you can use the setUrl() client-side method to load it only when needed. If you set the ShowContentDuringLoad property to false, RadWindow will give you a nice loading animation: http://demos.telerik.com/aspnet-ajax/window/examples/showcontentduringload/defaultcs.aspx.


    Marin Bratanov
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top