Open radwindow on item click

4 posts, 0 answers
  1. Tina
    Tina avatar
    130 posts
    Member since:
    Jul 2011

    Posted 11 Mar 2013 Link to this post

    How to open radwindow on clicking the menu item from client side?
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 11 Mar 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. John
    John avatar
    43 posts
    Member since:
    Aug 2014

    Posted 09 Feb 2015 in reply to Princy Link to this post

    Princy, what does the calling function look like?  If you're calling it from a RadMenu, how are you passing the sender and eventArgs?
  5. Ivan Danchev
    Admin
    Ivan Danchev avatar
    829 posts

    Posted 12 Feb 2015 Link to this post

    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.

     
Back to Top