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

Error happend when using RadGridView and Scrollviewer.

1 Answer 86 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Linh
Top achievements
Rank 1
Linh asked on 04 Oct 2012, 12:55 PM
Hello,
Please help me with this error. In my application, i put a RadGridView inside a Scrollviewer as showed the code block below. When i run this application each column becomes so wide, their widths are 10000px, equal to their MaxWidth althrougth i do not set any columns' MaxWidth:
<Window x:Class="GridViewTest.MainWindow"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                Title="MainWindow" Height="350" Width="525">
    <ScrollViewer telerik:StyleManager.Theme="Metro" HorizontalScrollBarVisibility="Auto">
        <telerik:RadGridView AutoGenerateColumns="False" ShowGroupPanel="False" ShowInsertRow="False" IsReadOnly="True" RowIndicatorVisibility="Collapsed" Name="grdItems">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="Header1" Width="50*" MinWidth="50" />
                <telerik:GridViewDataColumn Header="Header2" Width="25*" MinWidth="50" TextAlignment="Right" />
                <telerik:GridViewDataColumn Header="Header3" Width="25*" MinWidth="50" />
            </telerik:RadGridView.Columns>           
        </telerik:RadGridView>       
    </ScrollViewer>    
</Window>

What i really want is that the horizontal scrollbar apprears when the main window is not maximize and disappears when the main window is maximize.

1 Answer, 1 is accepted

Sort by
0
Stephan
Top achievements
Rank 1
answered on 17 Nov 2012, 12:02 AM
I changed the width = "128" and I think it did what you were looking for
Tags
GridView
Asked by
Linh
Top achievements
Rank 1
Answers by
Stephan
Top achievements
Rank 1
Share this question
or