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

Open RadWindow from ascx

1 Answer 133 Views
Window
This is a migrated thread and some comments may be shown as answers.
Jim
Top achievements
Rank 1
Jim asked on 19 Sep 2011, 08:29 PM
Hello,

Thanks in advance for any help on this...Let me explain as best I can:

I have a parent page where I declare the window manager and the given window.

 

<telerik:RadWindowManager ID="RadWindowManager1" runat="server" style="display:none;" Behavior="Close" InitialBehavior="None" Left="" Top="" Modal="true" >

 

 

<Windows>

 

 

<telerik:RadWindow ID="MyWindow" runat="server" Title="Buy Tickets" Height="600px"

 

 

    Width="700px" ReloadOnShow="False" Modal="True" Skin="Web20" VisibleStatusbar="False"

 

 

    Behaviors="Close" style="display:none;" Behavior="Close" InitialBehavior="None" Left=""     NavigateUrl=""     Top=""     ShowContentDuringLoad="False"  />

 

 

</Windows>

 

 

</telerik:RadWindowManager>




this page contains an ascx

the ascx conatains a nested repeater

the nested repeater contains dynamic hyperlink controls.

i want the navigateURL property to open a radwindow and I cannot get this to work.

I tried the following function in the parent page:
function ShowWindow()
{

 

     window.radopen('http://www.google.com', 'MyWindow');

 

}

and dynamically setting the navigateurl property of the hyperlinks to call that function as follows:

 

"javascript: ShowWindow();"

 

;

 

 

 


thanks for your help...jim

1 Answer, 1 is accepted

Sort by
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 20 Sep 2011, 01:37 AM
Try this
function openWindow(){
    var myWndID = $telerik.$('[id$="MyWindow"]').attr("id");
    var myWnd = $find(myWndID);
    myWnd.show();
}


To wireup your links, perhaps some jQuery?
$telerik.$(document).ready(function(){
    $telerik.$('.linkclass').click(function(){
         openWindow(); //perhaps pass a value
    });
});


I mean the .show is just to open it, really you can do anything
Tags
Window
Asked by
Jim
Top achievements
Rank 1
Answers by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Share this question
or