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

Rad Menu in Title Bar?

7 Answers 111 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Brian Stanek
Top achievements
Rank 2
Brian Stanek asked on 12 May 2008, 03:44 PM
Is it possible to add a rad menu to the title of a panel bar?

7 Answers, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 13 May 2008, 07:20 AM
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
0
Brian Stanek
Top achievements
Rank 2
answered on 13 May 2008, 12:46 PM
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.
0
Paul
Telerik team
answered on 13 May 2008, 12:59 PM
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
0
Brian Stanek
Top achievements
Rank 2
answered on 13 May 2008, 02:39 PM
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

0
Paul
Telerik team
answered on 13 May 2008, 02:57 PM
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
0
Brian Stanek
Top achievements
Rank 2
answered on 13 May 2008, 03:20 PM
ok, I will add in a new support ticket and reference this thread.
0
Paul
Telerik team
answered on 14 May 2008, 06:07 AM
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
Tags
PanelBar
Asked by
Brian Stanek
Top achievements
Rank 2
Answers by
Rosi
Telerik team
Brian Stanek
Top achievements
Rank 2
Paul
Telerik team
Share this question
or