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

Having trouble with RadWindow management

2 Answers 50 Views
Window
This is a migrated thread and some comments may be shown as answers.
toddhd
Top achievements
Rank 1
toddhd asked on 06 Apr 2011, 09:14 PM
I am using the RadWindow as a dialog box for a complex form in a medical application. The RadWindow contains a RadTab control, and each tab has another part of the form. Additionally, in some areas, I need to display another RadWindow to get some details, then close that extra window and continue working with the original one. (I should also mention that this page auto-refreshes once a minute or so to keep the data on it current).

I don't want the dialog to show when the initial page is displayed, it needs to be launched when a button is clicked, It should then stay open until explicitly closed.

I am opening it using Javascript:

function showWizard() {
    var oWnd = $find("<%= RadWindow1.ClientID %>");
    oWnd.show();
}           

This works, but if anything at all causes a postback, the window goes away, and for some reason, I usually can't get it to come back without closing the browser and starting over again.

Using the "VisibleOnPageLoad" option works much better generally speaking, but like I said, I don't want it to always be open.

Do you have any sample code which is fairly bulletproof in regards to managing the show/hide state of the window(s)?
VisibleOnPageLoad
VisibleOnPageLoad

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 07 Apr 2011, 07:51 AM
Hello,

I have found the following forums discussed similar scenario.
Stop RadWindow from always loading on page postback

Thanks,
Shinu.
0
Marin Bratanov
Telerik team
answered on 12 Apr 2011, 11:36 AM

Hello Todd,

This is quite a peculiar issue. If the RadWindow exists in the page you should be able to open it via this JavaScript function.

Without your actual code I can only be guessing, but please check whether the DestroyOnClose property is set to true or if the window is otherwise removed when it is closed (or in the code-behind after the postback) and if the RadWindow exists on the page (that is it is not created dynamically and always exists in the page). Any JavaScript errors on the page can also prevent the correct behavior, so please check the page for such issues also (especially if you are injecting client scripts from the server-side).

If the problem persists please open a support ticket and send us a fully runnable sample project that displays the behavior, along with reproduction steps, so we can debug it locally and pinpoint the cause.

Alternatively you can use the approach suggested in the other thread - setting the VisibleOnPageLoad property. You can use it in combination with a hidden field that is modified on the client-side and stores the necessary state of the given window and the VisibleOnPageLoad property is set accordingly on every postback.



Kind regards,
Marin
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Window
Asked by
toddhd
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Marin Bratanov
Telerik team
Share this question
or