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

Solved: RadMenu closes/collapses on item clicked

1 Answer 164 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Richard M
Top achievements
Rank 1
Richard M asked on 18 Feb 2011, 06:07 AM
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;
    }

1 Answer, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 22 Feb 2011, 06:49 PM
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!
Tags
Menu
Asked by
Richard M
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Share this question
or