Close menu after click

4 posts, 0 answers
  1. iomega 55
    iomega 55 avatar
    64 posts
    Member since:
    Dec 2004

    Posted 12 Aug 2009 Link to this post


    How can I parametrize the radmenu so when I click an option, the menu closes after it immediatly?

    At this moment when I click an option, and the mouse remains over the menu, the menu continues open, but I want it closes after it has been clicked.

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 13 Aug 2009 Link to this post


    Try the following client side code for closing all the menu items on clicking an item by attaching the OnClientItemClicked event and explicitly closing the subitems.

    <script type="text/javascript"
    function OnClientItemClicked(sender, eventArgs) 

  3. DevCraft R3 2016 release webinar banner
  4. Adam Haid
    Adam Haid avatar
    6 posts
    Member since:
    Dec 2005

    Posted 10 Feb 2011 Link to this post

    This doesn't work if you call eventArgs.set_cancel(true); in the same function.I'm trying to open a RadWindow then close the menu. If I don't set_cancel(true) then the page posts back and my RadWindow closes. When I call sender.close() after opening the RadWindow it doesn't close the window. Can someone help me keep my RadWindow open and still close the RadMenu?
     function MenuItemClicked(sender, eventArgs) {
                        switch (eventArgs.get_item().get_text()) {
                            case "Create New Ticket":
                            case "View Alert Documentation":
                                return false;
                    function openNewWindow() {
                        var oWnd = radopen("", "radWindow");

    <telerik:RadContextMenu ID="RadMenu1" runat="server" OnItemClick="RadMenu1_ItemClick" OnClientItemClicked="MenuItemClicked"
                EnableRoundedCorners="true" EnableShadows="true">
                    <telerik:RadMenuItem Text="Create New Ticket" ImageUrl="" Value="Create"/>
                    <telerik:RadMenuItem Text="View Alert Documentation" ImageUrl="" Value="View"/>
                    <telerik:RadMenuItem Text="Clear Alert" ImageUrl="" Value="Clear"/>
        <telerik:RadWindowManager ID="RadWindowManager" ShowContentDuringLoad="false" VisibleStatusbar="false"
             runat="server" EnableShadow="true">
                <telerik:RadWindow runat="server" ID="radWindow"></telerik:RadWindow>
  5. Elena
    Elena avatar
    4 posts
    Member since:
    Aug 2015

    Posted 14 Aug 2015 in reply to Adam Haid Link to this post

    Thank you so mu
Back to Top