RadPanelBar with dynamically created RadMenu

4 posts, 0 answers
  1. Subramanyam
    Subramanyam avatar
    10 posts
    Member since:
    Sep 2010

    Posted 25 Oct 2010 Link to this post

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Menu.aspx.cs" Inherits="MyTelerikSamples.Menu" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head runat="server">
        <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <telerik:RadPanelBar ID="RadPanelBar1" runat="server" Skin="Outlook" Width="190px">
               <telerik:RadPanelItem runat="server" Text="Root Panel Item" Expanded="true" Selected="true">
                       <telerik:RadPanelItem runat="server" Value="templateHolder">
           <CollapseAnimation Duration="100" Type="None" />
           <ExpandAnimation Duration="100" Type="None" />

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using Telerik.Web.UI;
    namespace MyTelerikSamples
        public partial class Menu : System.Web.UI.Page
            protected void Page_Load(object sender, EventArgs e)
                if (!IsPostBack)
                    RadPanelItem panelItem = (RadPanelItem)RadPanelBar1.FindItemByValue("templateHolder");
                    RadMenu myMenu = new RadMenu();
                          myMenu.Width = Unit.Percentage(100);   
                    myMenu.Skin = "Outlook";
                    myMenu.Flow = ItemFlow.Vertical;
                    RadMenuItem MainItem = new RadMenuItem("Main Item");
                    RadMenuItem Child1 = new RadMenuItem("Child 1");
                    Child1.Width = Unit.Percentage(100);
                    RadMenuItem Child2 = new RadMenuItem("Child 2");
                    Child2.Width = Unit.Percentage(100);


    I tried this solution given in the below link. Which did not work.

    Unable to see the menu on top of RadPanelBar1 and only able to see only 1 submenu item "Child 1" if i donot set myMenu.Width to 100%. 
    I donot want to increase the height of the panel as I have some other items to be shown  below myMenu.
    Please help me.
  2. Yana
    Yana avatar
    4547 posts

    Posted 28 Oct 2010 Link to this post

    Hi Subramanyam,

    I tried to reproduce this issue at our side but to no avail. I've attached a screenshot to show you the result. What is different in your case?

    Sincerely yours,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
  4. Rachana
    Rachana avatar
    18 posts
    Member since:
    Jul 2011

    Posted 04 Sep 2012 Link to this post


    actually i need to create Rad Panel bar's Dynamically....based on input provided ....if provided input is 6..then it should create 6 panel bars dynamically...For more information please find the attached image....Is it correct choice for these requirement using panel bar or any  other control i should use..please suggest me..if its rad panel bar..how to create from code behind panel bars
  5. Helen
    Helen avatar
    1052 posts

    Posted 04 Sep 2012 Link to this post

    Hello Rachana,

    If you just need a list of items without expand/collapse functionality I may suggest you to try our RadListBox control:

    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top