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

RadListBoxes inside a RadPanelbar

3 Answers 91 Views
Panelbar (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Renato Lopes
Top achievements
Rank 1
Renato Lopes asked on 22 Sep 2008, 03:33 PM
How can I put RadListBoxes inside a RadPanelbar?

3 Answers, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 24 Sep 2008, 09:57 PM
Hello Renato Lopes,

Thank you for the question.

I suppose that you want to add a label to some of the PanelBarGroups. In this case you could use the PanelBarGroupElement Items collection. Please, review the code-block below:
 
RadLabelElement labelElement = new RadLabelElement(); 
labelElement.Text = "label element"
 
this.radPanelBarGroupElement1.Items.Add(labelElement); 

The other way is to use the RadPanelBarGroupElement's property EnableHostControlMode. When you set this property to true then we add a ContentPanel as a child of the group element When the groups have EnableHostControlMode = true then you simply have to drag and drop RadLabel control into the content panel.

Please, let me know if this does not suite to your scenario.

Greetings,
Martin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Renato Lopes
Top achievements
Rank 1
answered on 25 Sep 2008, 08:57 AM
label??

I wan't to add a radListBox inside each group of the RadPanelBar.
0
Martin Vasilev
Telerik team
answered on 25 Sep 2008, 01:31 PM
Hi Renato Lopes,

Please excuse me for the misunderstanding.

Adding a RadListBox is almost the same as RadLabel. Please take a look at the slightly changed code below:
 
RadListBoxElement listBoxElement = new RadListBoxElement(); 
listBoxElement.MinSize = new Size(0,50); 
listBoxElement.Items.AddRange(new RadListBoxItem[]  
    {new RadListBoxItem("item1"), new RadListBoxItem("item2")});  
 
this.radPanelBarGroupElement1.Items.Add(listBoxElement); 

Note that is important to set a min height size of RadListBoxElement, otherwise it will not be visible.

If you have other questions, do not hesitate to contact me again.
 

Greetings,
Martin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Panelbar (obsolete as of Q2 2010)
Asked by
Renato Lopes
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
Renato Lopes
Top achievements
Rank 1
Share this question
or