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

Load content only when RadWindow is opene

1 Answer 168 Views
Window
This is a migrated thread and some comments may be shown as answers.
Mohamed
Top achievements
Rank 1
Mohamed asked on 24 Nov 2015, 08:33 AM

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.

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 24 Nov 2015, 01:27 PM

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.

Regards,

Marin Bratanov
Telerik
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
Tags
Window
Asked by
Mohamed
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or