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

multiple OpenerElementIDs for one RadWindow

4 Answers 144 Views
Window
This is a migrated thread and some comments may be shown as answers.
Craig Wallace
Top achievements
Rank 1
Craig Wallace asked on 26 Aug 2010, 11:44 AM
Hi,

I have a radwindow which contains lots of nice functionality, but I need it to be openable by two different OpenerElementIDs.  I'd rather avoid having to duplicate the window just to acheive this.

How can I wire up two OpenerElementIDs to the same RadWindow?
Also...
Once that is done, how can I tell which opener was used to open that instance of the window?

Thanks,

Craig

4 Answers, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 26 Aug 2010, 02:12 PM
Hello Craig,

I don't believe that situation is possible. The only way to allow muliple controls to open the same RadWindow would be to set the OnClientClick event of the control you want to open the RadWindow to something like so:

OnClientClick="radopen(null, '[Name Of RadWindow]'); return false;"

To determine which control opened the RadWindow, I guess you could pass something in the query string to the url used by the RadWindow.

I hope that helps.
0
Craig Wallace
Top achievements
Rank 1
answered on 26 Aug 2010, 02:31 PM
Hi Cori,

What is the [Name Of RadWindow] value?  I don't see a name attribute on the tag?

Thanks.

Craig
0
Princy
Top achievements
Rank 2
answered on 26 Aug 2010, 02:31 PM
Hello,


More information on opening the RadWindow from client code can be found here.
Opening Windows

As Cori sugegsts, you can use query string to pass the parameter to window. It is also possible to pass arguments to radwindow when opening/closing the window. Checkout the documentation for more information on this.
Using RadWindow as a Dialog


Thanks,
Princy.
0
Emanuele
Top achievements
Rank 2
answered on 02 May 2011, 06:44 PM
you can use something like this:

<script type="text/javascript">
    function ShowExternalLoginWindow() {
        var oWnd = $find("<%=wndExternalAccess.ClientID%>");
        oWnd.show();
    }
</script>
 
<telerik:RadWindow runat="server" ID="wndExternalAccess">
</telerik:RadWindow>
 
<asp:ImageButton runat="server" ID="imgOpenId" OnClientClick="ShowExternalLoginWindow(); return false;" />
Tags
Window
Asked by
Craig Wallace
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
Craig Wallace
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Emanuele
Top achievements
Rank 2
Share this question
or