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

Create and show Radwindow client-side?

2 Answers 161 Views
Window
This is a migrated thread and some comments may be shown as answers.
Sean Severson
Top achievements
Rank 1
Sean Severson asked on 11 Sep 2009, 01:36 PM
ASP.NET 2.0 application

I am creating a custom image button control that will be used for a help system within our application.  I wish to use the RadWindow to display our help text in a modal, sized window that is not pop-up-blocked.  The idea is that this custom control can be used by myself and other developers in our applications in a simple process of add the control to the page, set the properties, done.

There is no guarantee that the page that this custom control is added to will contain a RadWindowManager, but it may.  I have code to loop through the page's controls, in a recursive manner,  in order to locate the RadWindowManager if it exists.  If one does not exist, I create one and add it to the page's controls collection...oh, wait...this throws an exception about not being able to modify the controls collection during a certain event. 

I attempted to add the RadwindowManager to the controls collection of my image button and that did not cause an error, but radOpen does not work because GetRadWindowManager can't find the RadWindowManager.  When I view the source of my page, the RadWindowManager that I added to the controls collection of my image button is not there.

Is there another way to add the RadWindowManager to the page's controls collection so it can be used?  Can I create the radwindow on the client and then open it  via javascript?

Thanks,

Sean M. Severson

2 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 16 Sep 2009, 09:04 AM
Hi Sean,

I assume that the problem with the control collection is not directly related to RadWindowManager but to the custom code, manner and point of life cycle you are trying to add the control. You can easily test this by trying to add a standard asp button. In case you succeed with the button but experience problems with the RadWindowManager, please prepare a sample, fully runnable demo which shows the desired result with the button, open a new support ticket and send it to us along with detailed explanations and we will achieve the same effect with a RadWindowmanager instead of the button. 

In case the problem still persists with the button, you should revise your code  and find the reason for the problem.

As to your second question, no, ther eis no way to create a RadWindow on the client without having a RadWindowManager. I am not sure about your exact scenario, but you can also consider using a single RadWindow instead of the manager if this suits better your requirements.


Greetings,
Svetlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Sean Severson
Top achievements
Rank 1
answered on 16 Sep 2009, 11:40 AM
Svetlina,

The problem is not directly related to the RadWindowManager.  Rather, it is where in the lifecycle I was attempting to add the control to the page's controls collection.  I will look into using the single RadWindow.  At this point, my custom control will require the RadWindowManager to be present on the page.  The developer will need to ensure that this is the case.

Thanks.

Sean M .Severson
Tags
Window
Asked by
Sean Severson
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Sean Severson
Top achievements
Rank 1
Share this question
or