Solved: RadMenu closes/collapses on item clicked

2 posts, 0 answers
  1. Richard M
    Richard M avatar
    76 posts
    Member since:
    Mar 2010

    Posted 18 Feb 2011 Link to this post

    I was having a hard time creating a RadMenu that allows you to pick an item/node, collapses/closes all items, and then lists the selected item on the radmenu after it is collapsed.  The Telerik demos stay expanded after you click an item.  The trick is to set Postback="true" on the items that you want to collapse the RadMenu. When you click on the item, it renames the RadMenu main item to the item you clicked on the server side.  So do I get Telerik some points??? : )

                    <telerik:RadMenu ID="RadMenu1" runat="server" ClickToOpen="true" onitemclick="RadMenu1_ItemClick"  >
                        <Items>
                            <telerik:RadMenuItem Text="Main" PostBack="false" >
                                <Items>
                                    <telerik:RadMenuItem Text="Item 1" PostBack="false">
                                        <Items>
                                            <telerik:RadMenuItem  Text="Sub Item 1" PostBack="true"  ></telerik:RadMenuItem>
                                        </Items>
                                    </telerik:RadMenuItem>
                                </Items>
                            </telerik:RadMenuItem>
                        </Items>
                    </telerik:RadMenu>

    (server-side code)
        protected void RadMenu1_ItemClick (object sender, RadMenuEventArgs e)
        {
            RadMenu1.Items[0].Text = e.Item.Text;
        }
  2. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1268 posts

    Posted 22 Feb 2011 Link to this post

    Hi Richard,

    Generally we are giving point either for bug reporting or code library project providing.

    Here is an article giving detail explanation about our policy regarding Telerik points.

    All the best,
    Dimitar Terziev
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top