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

Width of content in RadPanelBarItem

3 Answers 149 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 1
Simon asked on 19 Dec 2012, 10:50 AM

I have a RadGridView inside a RadPanelBarItem, the grid has lots of columns so doesn't fit horizontally in the PanelBarItem.  By default the RadPanelBarItem expands to accommodate the gird however I'd like the grid to respect the width of its parent RadPanelBarItem.

<telerik:RadPanelBar>
    <telerik:RadPanelBarItem IsExpanded="True">
        <telerik:RadPanelBarItem.Header>
            <TextBlock Text="Grid"/>
        </telerik:RadPanelBarItem.Header>
        <telerik:RadGridView >
            <telerik:RadGridView.Columns>
                <telerik:GridViewColumn Header="Header">
                </telerik:GridViewColumn>
                <telerik:GridViewColumn Header="Header">
                </telerik:GridViewColumn>
                <telerik:GridViewColumn Header="Header">
                </telerik:GridViewColumn>
                <telerik:GridViewColumn Header="Header">
                </telerik:GridViewColumn>
                <telerik:GridViewColumn Header="Header">
                </telerik:GridViewColumn>
                <telerik:GridViewColumn Header="Header">
                </telerik:GridViewColumn>
                <telerik:GridViewColumn Header="Header">
                </telerik:GridViewColumn>
                <telerik:GridViewColumn Header="Header">
                </telerik:GridViewColumn>
                <telerik:GridViewColumn Header="Header">
                </telerik:GridViewColumn>
                <telerik:GridViewColumn Header="Header">
                </telerik:GridViewColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </telerik:RadPanelBarItem>
</telerik:RadPanelBar>

I have tried binding the width of the RadGridView to the ActualWidth of the RadPanelBar which gets close but is off by a few pixels due to the margin around the RadPanelBarItem content.  I'd prefer a solution which doesn't involve binding the width of the grid.

3 Answers, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 21 Dec 2012, 02:51 PM
Hello Simon,

I am not sure that I understand your scenario. Is it possible for you to send us your project so we can better understand it and suggest the best approach in your case?

Thank you for your cooperation.

Regards,
Pavel R. Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Oddvin Kaafjord
Top achievements
Rank 1
answered on 08 Mar 2013, 08:21 AM
Hi

I'm experiencing the same problem. When resizing(maximizing) the application the content of the RadPanelBar resizes accordingly, but when I try to decrease the size of the application window the content of the RadPanelBar does not resize, keeps the maximized size.

Also using the RadTimeBar component inside the RadPanelBar causese it to not display intervals.

0
Tina Stancheva
Telerik team
answered on 12 Mar 2013, 04:51 PM
Hello Oddvin,

The RadPanelBar ControlTemplate defines a ScrollViewer that wraps the Items of the PanelBar so you can remove it to allow the content of the PanelBarItems to use their own measuring mechanism to work. This will allow the RadTimeBar component to display its built-in ScrollViewer and it will reflect the actual size of the bar.

Please give this a try and let me know it it helps.

Regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
PanelBar
Asked by
Simon
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Oddvin Kaafjord
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or