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

How to get horizontal scrollbar in a RadGridView in a window with Auto Width

4 Answers 135 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Dipti
Top achievements
Rank 1
Dipti asked on 07 Mar 2014, 07:06 AM
Hi,

I have an application in which we haven't defined width and height for the windows or controls, instead we used Auto and * mostly for control size. To make the screen design fluid and support multiple display sizes.

I am facing an issue in showing a horizontal scroll bar for my RadGridView which is placed inside panel with no width and height defined.  I have defined Auto and * as the Column's width in gridview. 

My requirement is that a scroll bar should appear when the content of the grid take more space than the space available on the screen. But currently the content is clipped and no scrollbar appears (see screenshot attached).

The code I am using is:

<Grid x:Name="LayoutRoot">
    <telerik:RadExpander IsExpanded="True">
        <DockPanel>
            <telerik:RadDataPager DockPanel.Dock="Bottom"/>
            <telerik:RadGridView x:Name="billDataGrid" AutoGenerateColumns="False">
                <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn Header="Ship To Bill To ID" Width="Auto" TextWrapping="Wrap" DataMemberBinding="{Binding BillToID}"/>
                    <telerik:GridViewDataColumn Header="Ship To ID" Width="Auto" TextWrapping="Wrap" DataMemberBinding="{Binding ShipToID}"/>
                    <telerik:GridViewDataColumn Header="Bill TO ID" Width="Auto" TextWrapping="Wrap" DataMemberBinding="{Binding ID}"/>
                    <telerik:GridViewDataColumn Header="Bill To Name" Width="Auto" TextWrapping="Wrap" DataMemberBinding="{Binding Name}"/>
                    <telerik:GridViewDataColumn Header="Bill To Address1" Width="Auto" TextWrapping="Wrap" DataMemberBinding="{Binding Address1}"/>
                    <telerik:GridViewDataColumn Header="Bill To Address2" Width="Auto" TextWrapping="Wrap" DataMemberBinding="{Binding Address2}"/>
                    <telerik:GridViewDataColumn Header="Bill To Address3" Width="Auto" TextWrapping="Wrap" DataMemberBinding="{Binding Address3}"/>
                    <telerik:GridViewDataColumn Header="Bill To Address4" Width="Auto" TextWrapping="Wrap" DataMemberBinding="{Binding Address4}"/>
                    <telerik:GridViewDataColumn Header="Bill To Address5" Width="Auto" TextWrapping="Wrap" DataMemberBinding="{Binding Address5}"/>
                    <telerik:GridViewDataColumn Header="Bill To Address6" Width="Auto" TextWrapping="Wrap" DataMemberBinding="{Binding Address6}"/>
                </telerik:RadGridView.Columns>
            </telerik:RadGridView>
        </DockPanel>
    </telerik:RadExpander>
</Grid>


Please help me getting a scroll bar.
Thanks.

4 Answers, 1 is accepted

Sort by
0
Dipti
Top achievements
Rank 1
answered on 10 Mar 2014, 04:49 AM
Please provide a solution.
Thanks.
0
Hristo
Telerik team
answered on 10 Mar 2014, 10:28 AM
Hi Dipti,

I was unable to reproduce your problem. Can you modify the provided project, which is based on your sample code and send it back to me, in order to troubleshoot the problem?
You can also check this article from our online documentation, which explains how to add a Scrollbar to the GridView.

Regards,
Hristo
Telerik

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

0
Accepted
Hristo
Telerik team
answered on 12 Mar 2014, 10:13 AM
Hello Dipti,

I was unable to reproduce your problem. Can you modify the provided project, which is based on your sample code and send it back to me, in order to troubleshoot the problem?
You can also check this article from our online documentation, which explains how to add a Scrollbar to the GridView.

Regards,
Hristo
Telerik
 

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

 
0
Dipti
Top achievements
Rank 1
answered on 26 Mar 2014, 04:48 AM
The issue was resolved when we took the latest version of Telerik Dlls and used styles from latest XAML.
Thanks.
Tags
GridView
Asked by
Dipti
Top achievements
Rank 1
Answers by
Dipti
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or