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

Need Help - MasterPage > WindowManager > UserControl

1 Answer 95 Views
Window
This is a migrated thread and some comments may be shown as answers.
Dean
Top achievements
Rank 1
Dean asked on 23 Nov 2010, 07:51 PM
Hello Everyone,

I have been searching for an hour trying to find the solution to this issue.

I am trying to access a RadWindow from a RadWindowManager on a MasterPage within a UserControl.
So...

MasterPage >> WindowManager >> UserControl >> RadWindow


MasterPage
-----------------------

 

 

<telerik:RadWindowManager ID="RadWindowManager1" runat="server">

 

 

 

</telerik:RadWindowManager>

 



UserControl
-------------------------

<

 

 

style type="text/css">

 

 

 

.style1

 

{

 

 

width: 32px;

 

 

 

height: 32px;

 

}

</

 

 

style>

 

<

 

 

p>

 

 

 

<img alt="" class="style1"

 

 

 

src="../../images/ui/1290451133_x-office-document.png" /></p>

 

 

<

 

 

telerik:RadWindow ID="RadWindow1" runat="server">

 

<

 

 

ContentTemplate>

 

 

 

<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

 

</

 

 

ContentTemplate>

 

</

 

 

telerik:RadWindow>

OnClick of the <IMG> tag I would like to load this RadWindow into the RadWindowManager collection (display it).

What is the best way to achieve this functionality?

Also, is there a way to load a UserControl within the RadWindow?

Many thanks,
~Dean

 

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 26 Nov 2010, 01:11 PM
Hello Dean,

If I understand your scenario correctly, your setup is:
1. A MasterPage (MasterPage.master for example) with a RadWindowManager in it.
2. A content page loaded in that MasterPage (Page1.aspx for example).
3. A user control loaded in Page1.aspx
4. A RadWindow in that user control.
and you want to show the RadWindow in the user control by clicking on the image that is in the same user control.

If this is indeed your setup, you don't need the RadWindowManager in the MasterPage to show the RadWindow in the user control. RadWindow can be used as a standalone control and to show it you simply need to get a reference to its ASP.NET AJAX object and then call its show() method.

i.e..
<img alt="" class="style1" src="../../images/ui/1290451133_x-office-document.png" onclick="showWin(); return false;" />
 
<script type="text/javascript">
 
function showWin()
{
    var oWnd = $find("<%= RadWindow1.ClientID %>");
    oWnd.show()
}
 
</script>

More information on the subject is available in this help article.
As for loading a user control in a RadWindow, yes this is possible - check this help article and this demo for more details.


Kind regards,
Georgi Tunev
the Telerik team
Browse the vast support resources we have to jumpstart 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
Dean
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or