Related RadMenu

2 posts, 1 answers
  1. Joseph
    Joseph avatar
    21 posts
    Member since:
    Mar 2013

    Posted 05 Apr 2013 Link to this post


    There is a RadMenu on top of my page. Based on the selected menu, I want to populate another RadMenu. Please help.

    Thanks in advance
  2. Answer
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 05 Apr 2013 Link to this post

    Hi Joseph,

    Please have a look at the following sample code which works fine at my end.

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <telerik:AjaxSetting AjaxControlID="RadMenu1">
                    <telerik:AjaxUpdatedControl ControlID="CategoryPanel" LoadingPanelID="RadAjaxLoadingPanel1" />
    <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1">
    <telerik:RadMenu ID="RadMenu1" runat="server" OnItemClick="RadMenu1_ItemClick" Skin="Office2010Silver">
            <telerik:RadMenuItem Text="Laptop" />
            <telerik:RadMenuItem Text="PenDrive" />
            <telerik:RadMenuItem Text="Mobile" />
    <br />
    <asp:Panel runat="server" ID="CategoryPanel">
        <br />
            <asp:Label runat="server" ID="CurrentCategory" /></h4>
        <telerik:RadMenu ID="RadMenu2" runat="server" Flow="Vertical" Visible="false" Skin="Office2010Silver">

    protected void Page_Load(object sender, EventArgs e)
        if (!Page.IsPostBack)
    protected void FilterMenu(RadMenuItem rootItem)
        switch (rootItem.Text)
            case "Laptop":
                RadMenu2.Items.Add(new RadMenuItem("Dell"));
                RadMenu2.Items.Add(new RadMenuItem("HP"));
                RadMenu2.Items.Add(new RadMenuItem("Lenovo"));
                RadMenu2.Items.Add(new RadMenuItem("Acer"));
            case "PenDrive":
                RadMenu2.Items.Add(new RadMenuItem("Transcend"));
                RadMenu2.Items.Add(new RadMenuItem("SanDisk"));
                RadMenu2.Items.Add(new RadMenuItem("Kingston"));
                RadMenu2.Items.Add(new RadMenuItem("HP"));
            case "Mobile":
                RadMenu2.Items.Add(new RadMenuItem("Samsung"));
                RadMenu2.Items.Add(new RadMenuItem("Nokia"));
                RadMenu2.Items.Add(new RadMenuItem("Sony"));
                RadMenu2.Items.Add(new RadMenuItem("HTC"));
        RadMenu2.Items[0].Width = Unit.Pixel(168);
        RadMenu2.Visible = true;
        CurrentCategory.Text = rootItem.Text;
        rootItem.Selected = true;
    protected void RadMenu1_ItemClick(object sender, RadMenuEventArgs e)

  3. DevCraft R3 2016 release webinar banner
Back to Top