Rad Menu in Title Bar?

8 posts, 0 answers
  1. Brian Stanek
    Brian Stanek avatar
    15 posts
    Member since:
    Jan 2008

    Posted 12 May 2008 Link to this post

    Is it possible to add a rad menu to the title of a panel bar?
  2. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 13 May 2008 Link to this post

    Hi Brian,

    Please see our online example PanelBar And Menu.

    Hope this will help you achieve your task.

    Regards,
    Rosi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Brian Stanek
    Brian Stanek avatar
    15 posts
    Member since:
    Jan 2008

    Posted 13 May 2008 Link to this post

    This sample puts the rad menu in the item template.  Is there a Title Template?  I would like to place a drop-down menu inside the title bar.  I know I can do it with a RAD Dock but I am running into limitations with the Rad Dock control.
  5. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 13 May 2008 Link to this post

    Hello Brian,

    Please refer to our Templates example that shows the needed approach.

    Sincerely yours,
    Paul
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Brian Stanek
    Brian Stanek avatar
    15 posts
    Member since:
    Jan 2008

    Posted 13 May 2008 Link to this post

    I must be missing something.  I have added in the control using the templates at runtime.  I had that part working but the menu is below the line. 

    I cannot seem to post an example here but is my C# code (the ASPX only has a bare bones panel control:

    class

    SummaryTemplate : ITemplate

    {

    public void InstantiateIn(Control container)

    {

    RadMenu menu = new RadMenu();

    menu.Skin =

    "Telerik";

    menu.OnClientItemClicked =

    "onClicked";

    menu.CollapseAnimation.Type =

    AnimationType.None;

    RadMenuItem subMenu = new RadMenuItem("(change <img src='Images/arrow.gif' originalAttribute="src" originalPath="Images/arrow.gif" border='0' alt=''/>)");

    subMenu.Items.Add(

    new RadMenuItem("Books"));

    subMenu.Items.Add(

    new RadMenuItem("Cameras"));

    subMenu.Items.Add(

    new RadMenuItem("Apparel"));

    menu.DataBinding +=

    new EventHandler(menu_DataBinding);

    menu.Items.Add(subMenu);

    container.Controls.Add(menu);

    }

    void menu_DataBinding(object sender, EventArgs e)

    {

    }

    }

    public partial class PanelTest : System.Web.UI.Page

    {

    #region

    Variables

    #endregion

    #region

    Constructors

    #endregion

    #region

    Events

    #endregion

    #region

    Properties

    #endregion

    #region

    Abstract Methods

    #endregion

    #region

    Public Methods

    #endregion

    #region

    Protected Methods

    protected override void OnInit(EventArgs e)

    {

    //RadPanelBar1.ItemTemplate = new SummaryTemplate();

    base.OnInit(e);

    }

    protected void Page_Load(object sender, EventArgs e)

    {

    if (!Page.IsPostBack)

    {

    CreateSummaryPage();

    }

    SummaryTemplate template = new SummaryTemplate();

    template.InstantiateIn(RadPanelBar1.Items[0]);

    RadPanelBar1.DataBind();

    }

    #endregion

    #region

    Event Handlers

    #endregion

    #region

    Menu Handlers

    #endregion

    #region

    Private Methods

    private void CreateSummaryPage()

    {

    RadPanelItem summaryPage = new RadPanelItem("Products > Books");

    summaryPage.Expanded =

    true;

    RadPanelItem summaryItem = new RadPanelItem();

    Control ctrl = LoadControl(@"~\SummaryPages\CustomerSummaryPage.ascx");

    summaryItem.Controls.Add(ctrl);

    summaryPage.Items.Add(summaryItem);

    RadPanelBar1.Items.Add(summaryPage);

    summaryPage =

    new RadPanelItem("Customer testmonials");

    summaryItem =

    new RadPanelItem();

    ctrl = LoadControl(

    @"~\SummaryPages\CustomerSummaryPage.ascx");

    summaryItem.Controls.Add(ctrl);

    summaryPage.Items.Add(summaryItem);

    RadPanelBar1.Items.Add(summaryPage);

    summaryPage =

    new RadPanelItem("How to find us");

    summaryItem =

    new RadPanelItem();

    ctrl = LoadControl(

    @"~\SummaryPages\CustomerSummaryPage.ascx");

    summaryItem.Controls.Add(ctrl);

    summaryPage.Items.Add(summaryItem);

    RadPanelBar1.Items.Add(summaryPage);

    }

    #endregion

  7. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 13 May 2008 Link to this post

    Hello Brian,

    Unfortunately, the provided information does not help us much in reproducing the error. I'm afraid we could not be of much help unless we reproduce the issue on our side. It will be best if you can open a support ticket and send us a simple running project (incl. your custom skin, CSS, images, DB backup if needed and so on) demonstrating the problem (and step-by-step instructions on doing so). In that way we can reproduce and pinpoint the problems you're facing on our side, understand the logic of your application and provide a solution.

    Kind regards,
    Paul
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  8. Brian Stanek
    Brian Stanek avatar
    15 posts
    Member since:
    Jan 2008

    Posted 13 May 2008 Link to this post

    ok, I will add in a new support ticket and reference this thread.
  9. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 14 May 2008 Link to this post

    Hi Brian,

    Actually, your code works as expected. Still, you have forgotten to include the styles.css file that has some additional CSS classes to position the menu.

    Regards,
    Paul
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017