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

Layout problem with column sizes on initial load

1 Answer 125 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kevin Sonney
Top achievements
Rank 1
Kevin Sonney asked on 27 Aug 2010, 08:54 PM
I'm having layout problems with my grid at the initial load.  A couple of my columns will not auto size properly after they load their data, but as soon as I resize the browser window a bit the layout updates and everything is sized properly.  I've attached two screenshots to show the problem I'm seeing.  I've tried playing with the layout and some different properties, but I can't seem to get it to layout correctly after loading the data.

Here is my code:
<Grid Grid.Row="1" DataContext="{Binding Product, ElementName=mThis}" Grid.Column="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Border CornerRadius="5" Background="{StaticResource InformationHeaderBrush}" Margin="3" Height="25">
                <Border Style="{StaticResource BorderGlossEffectStyle}" CornerRadius="5">
                    <TextBlock Text="Exchange Mail Stores" Style="{StaticResource TitleAreaTextStyle}"/>
                </Border>
            </Border>
 
            <telerik:RadGridView Grid.Row="1" ItemsSource="{Binding MailStores}" CanUserResizeColumns="True" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                         CanUserReorderColumns="True" CanUserDeleteRows="False" RowIndicatorVisibility="Collapsed" IsFilteringAllowed="False"
                                         AutoGenerateColumns="False" IsReadOnly="True" CanUserSortColumns="True" CanUserSelect="False"
                                         AutoExpandGroups="True" telerik:StyleManager.Theme="Windows7" Margin="3 0 3 0">
                <telerik:RadGridView.GroupDescriptors>
                    <telerik:GroupDescriptor Member="Owner" DisplayContent="Server">
                        <telerik:GroupDescriptor.AggregateFunctions>
                            <telerik:CountFunction Caption="Total Mail Stores:"/>
                        </telerik:GroupDescriptor.AggregateFunctions>
                    </telerik:GroupDescriptor>
                </telerik:RadGridView.GroupDescriptors>
                <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Name}" Width="*"/>
                    <telerik:GridViewDataColumn Header="Server" DataMemberBinding="{Binding Owner}"/>
                    <telerik:GridViewDataColumn Header="File Size" DataMemberBinding="{Binding Size, Converter={StaticResource BytesToStringConverter}}"/>
                    <telerik:GridViewDataColumn Header="Mailboxes" DataMemberBinding="{Binding Mailboxes}" DataFormatString="N0"/>
                    <telerik:GridViewDataColumn Header="Items" DataMemberBinding="{Binding Items}" DataFormatString="N0"/>
                </telerik:RadGridView.Columns>
            </telerik:RadGridView>
        </Grid>

1 Answer, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 31 Aug 2010, 12:13 PM
Hi Kevin Sonney,

Based on the code posted I have prepared sample application. However, I am unable to get the issue you are facing. Could you please check the attached project and let me know if the problem can be reproduced. If not could you modify it in order to reproduce this issue.

Sincerely yours,
Tsvyatko
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Kevin Sonney
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Share this question
or