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

Calling Radwindow Inside user control that is on the page

7 Answers 253 Views
Window
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 04 Aug 2011, 09:09 AM
Hi,

I don't know if this is possible or not. I have a default page, which is there was a radmenu that when I clicked It will add dynamically a dock, inside is a user control I called on the page, Inside the user control is text boxes, labels and radwindow.

Now here is a problem, I have custom command of dynamically created dock, that when I clicked on the custom command, the rad window, inside the user control which is on dynamically added dock should be display, but it doesn't work. I want to try the same thing as the
http://www.jotform.com, that when they clicked on the custom command on their dock the radwindow will open. I hope anyone could help me on this. It's bugging me for almost 1 week


Thanks

jonathan

7 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 04 Aug 2011, 04:37 PM
Hello Jonathan,

  I am not sure I understand your scenario completely and I could not find such functionality on that site - neither docks, nor a window being opened from them.

What I can suggest, though, is that you place all your JavaScript on the main page, so that it is readily available and also add a hidden field where you can store the ClientID of the RadWIndow after you add it to the page in the code-behind. Thus when the custom command is executed it calls a JavaScript function on the main page which can access the hidden field and obtain the RadWindow's ClientID. Then you can use $find(theClientID).show(); to open the RadWindow.

  For your convenience I created and attached a simple page that shows this approach. It illustrates the basic concept and I hope it will help you to incorporate this functionality in your actual project.


Greetings,
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.

0
Jonathan
Top achievements
Rank 1
answered on 05 Aug 2011, 07:53 AM
Hi,

Actually I want just likely the same as the jotforms.com have. So enable for me to do that, I use rad dock control place the position of the controls, each controls is organized and created under the user control, so every time I clicked on the menu, it will automatically created dock and inside that dock is the user control I created.

User Control Contains : label/ textbox/ radpanel /  datepicker / dropdown

The properties of that user control was inside the radwindow content template. that when I change the property setting of control it will automatically change the settings of the object inside the user control which is embedded to the dock. just like jotforms.com when they click on the custom command icon of their called dock, property window will display to setup the property of the object they selected.

I don't know if this has intervention with the database. but the concept I was trying to make is just exactly the same as the jotforms.com but I just doing it using telerik controls.

I hope I could find an answer, since this is real challenging.

Thank you.






0
Marin Bratanov
Telerik team
answered on 08 Aug 2011, 10:53 AM
Hello Jonathan,


When the RadWindow's ContentTemplate is used it behaves just like any other iNaming container - be it an UpdatePanel, a UserControl or a MasterPage, which means that you should not have any issues in referencing its content via the code-behind or JavaScript (well, the usage of server code blocks will help here).

Please note that our support system is focused on providing workarounds for bugs and controls' incompliances and we do not develop custom solutions. We have uploaded a lot of online demos which cover the functionality of the controls and they should be enough to let the developer extend them further in order to implement the desired scenario. I recommend to examine this online demo which shows ho to work with custom commands on the RadDock. When you install RadControls, our online examples projects are automatically installed on your computer and you can not only examine their full source code, but also extend them further in order to meet your requirements.


Here is a list of resources I believe you may find useful in your quest to achieve the desired user experience:
http://www.telerik.com/help/aspnet-ajax/dock-usability-commands.html
http://www.telerik.com/help/aspnet-ajax/window-programming-opening.html
http://www.telerik.com/help/aspnet-ajax/radwindow-controls-container.html
http://www.telerik.com/help/aspnet-ajax/window-programming-using-radwindow-as-dialog.html
http://demos.telerik.com/aspnet-ajax/window/examples/overview/defaultcs.aspx
http://demos.telerik.com/aspnet-ajax/window/examples/dialogreturnvalue/defaultcs.aspx
http://demos.telerik.com/aspnet-ajax/window/examples/contenttemplatevsnavigateurl/defaultcs.aspx

I hope this will help you to get started with your project and that you will be able to achieve the desired behavior.


Greetings,
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.

0
Jonathan
Top achievements
Rank 1
answered on 10 Aug 2011, 06:32 AM
Hi,

thanks, I got some scripts to cater my needs. anyway thanks for the support :-)
0
Arshad
Top achievements
Rank 2
answered on 27 Jan 2013, 07:33 AM
Dear Jonathan,

Please post that script that fixed your problem. Thank you!
0
Sohaib
Top achievements
Rank 1
answered on 11 Mar 2015, 11:21 AM
Hi, 

I am working on an application where default.aspx is behaving like a master page and I have created many user controls to render in this page. On one of my user control I have used radwindow which is working fine on rad menu button click which is from default.aspx 
but when I go to some user control and click the parent button which opens rad window then It does not open the window and give a script error saying that radopen does not belong etc.

I want to open window anywhere I want so please suggest me how to do it efficiently.
0
Arshad
Top achievements
Rank 2
answered on 11 Mar 2015, 11:27 AM
You have to set ZIndex of your RadWindow and it's parent UserControl in a way that RadWindow must have more value than UserControl and UserControl must have more than MasterPage. Hopefully it'll work.
Tags
Window
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Jonathan
Top achievements
Rank 1
Arshad
Top achievements
Rank 2
Sohaib
Top achievements
Rank 1
Share this question
or