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

Open radwindow on item click

3 Answers 67 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Tina
Top achievements
Rank 1
Tina asked on 11 Mar 2013, 12:21 PM
How to open radwindow on clicking the menu item from client side?

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 11 Mar 2013, 12:31 PM
Hello Tina,

Please have a look at the following code.

JavaScript:
<script type="text/javascript">
  function MenuOpenWindow(sender, eventArgs)
  {
    if (eventArgs.get_item().get_text() == "Change Password")
    {
    radopen(null,"Window1");
    return false;
    }
  }
</script>

Thanks,
Princy.
0
John
Top achievements
Rank 1
answered on 09 Feb 2015, 10:24 PM
Princy, what does the calling function look like?  If you're calling it from a RadMenu, how are you passing the sender and eventArgs?
0
Ivan Danchev
Telerik team
answered on 12 Feb 2015, 12:07 PM
Hello,

Here's a way to get a reference to the window and open it through the OnClientItemClicking event handler of the RadMenu:
<telerik:RadMenu ID="RadMenu1" runat="server" Flow="Horizontal"  OnClientItemClicking="onClicking">

function onClicking(sender, args) {
    var window = $find("<%= RadWindow1.ClientID %>");
    window.show();
}


Regards,
Ivan Danchev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Menu
Asked by
Tina
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
John
Top achievements
Rank 1
Ivan Danchev
Telerik team
Share this question
or