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

PanelBarItem not expanding without Text attribute

4 Answers 56 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Simon Ottaway
Top achievements
Rank 1
Simon Ottaway asked on 20 Aug 2008, 12:19 PM

I have a simple panelbar but it will not expand using client Javascript, i.e. item.expand(), unless the RadPanelItem has a text attribute.

I do not need the text attribute as the content is defined in the item template. Also, it does not seem possible to hide the vertical space taken by the root item using skin css (not for IE anyway).

Is there a way I can achieve a textless panel item that expands please?

            <telerik:RadPanelBar ID="MyPanelBar" Width="100%" runat="server">  
                <Items> 
                    <telerik:RadPanelItem Expanded="false" Text="I DONT WANT THIS TEXT">  
                        <ItemTemplate> 
                            <table><tr><td>1</td><td>2</td></tr></table> 
                        </ItemTemplate> 
                        <Items> 
                            <telerik:RadPanelItem> 
                                <ItemTemplate> 
                                    <table><tr><td>1</td><td>2</td></tr></table> 
                                </ItemTemplate> 
                            </telerik:RadPanelItem> 
                        </Items> 
                    </telerik:RadPanelItem> 
                </Items> 
            </telerik:RadPanelBar> 

4 Answers, 1 is accepted

Sort by
0
Accepted
Rosi
Telerik team
answered on 20 Aug 2008, 01:47 PM
Hi Simon Ottaway,

You can change this behavior by setting the text to "&nbsp". Please find the attached project for a reference. It illustrates also how you can position the template over the vertical space.


All the best,
Rosi
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Simon Ottaway
Top achievements
Rank 1
answered on 21 Aug 2008, 08:17 AM
Thanks, Rosi. That has worked nicely.
0
Massimo
Top achievements
Rank 2
answered on 02 Sep 2008, 05:06 PM
I need same functionality to overlap controls over the root item of a PanelBar: but with the code of the sample the panel body don't expand and the controls contained in the panel overlap over the rest of the form.
Thanks for a solution.
Massimo
0
Yana
Telerik team
answered on 03 Sep 2008, 12:52 PM
Hello Massimo,

Please check this online example which demonstrates RadPanelBar item templates, note the menu which overlaps the first root item - it's done with the help of css.

Regards,
Yana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
PanelBar
Asked by
Simon Ottaway
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Simon Ottaway
Top achievements
Rank 1
Massimo
Top achievements
Rank 2
Yana
Telerik team
Share this question
or