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

Rendering issue for column having width * and Resize + TextWraping enabled

3 Answers 89 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Dmitry
Top achievements
Rank 1
Dmitry asked on 31 Oct 2011, 01:45 PM
Hi,

I've an issue with RagGridView rendering.
When I have a column with width=auto (TextWrapping=Wrap + IsResizable=True) followed by the column with width=* (TextWrapping=Wrap + IsResizable=True) then during first rendering (and only first) additional empty column appears at the end. After grid width change (e.g. resize of the window) columns widths recalculation happens and grid is rendered correctly.

You can find a sample project illustrating the problem at http://www.box.net/shared/rfyhk6o51rffzk34oid5

Let me know if you need more information.

3 Answers, 1 is accepted

Sort by
0
Predrag
Top achievements
Rank 1
answered on 29 Nov 2011, 02:55 PM
Hello,

I' m facing similar problem even with latest Telerik build (Q3 2011). I have RagGridView that has column with width=*, then during the rendering additional empty column appears at the end. On page I have Grid with 3 columns RagGridView is placed inside one column with width=*.

<Grid>
    <Grid.RowDefinitions>
        <!-- content header: title, filter, ... / content / content footer: buttons -->
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*"/>
        <RowDefinition Height="30" />
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
        <!-- two columns with splitter -->
        <ColumnDefinition Width="*"/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="*"/>
    </Grid.ColumnDefinitions>
 
    <!-- Row="1", Column="0" - DataGrid -->
    <telerik:RadGridView
        x:Name="DataGrid"
        AutoGenerateColumns="False"
        Grid.Row="1" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
        ItemsSource="{Binding Path=DataView, ElementName=DomainDataSource}"
        RowDetailsVisibilityMode="VisibleWhenSelected"
        RowIndicatorVisibility="Collapsed" AlternationCount="2">
        <telerik:RadGridView.Columns>                  
            <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Name}"
                                                                    TextAlignment="Left" HeaderTextAlignment="Left" 
                                                                    Width="SizeToCells"
                                                                    IsFilterable="True"
                                                                    ShowDistinctFilters="False"
                                                                    ShowFieldFilters="True"/>
            <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=City}"
                                                                    Width="SizeToCells"
                                                                    IsFilterable="True"
                                                                    ShowDistinctFilters="False"
                                                                    ShowFieldFilters="True"/>
            <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Path}"
                                                                    Width="*"
                                                                    IsFilterable="True"
                                                                    ShowDistinctFilters="False"
                                                                    ShowFieldFilters="True"/>
            <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Count}"
                                                                    TextAlignment="Right" HeaderTextAlignment="Right" 
                                                                    Width="SizeToHeader"
                                                                    IsFilterable="True"
                                                                    ShowDistinctFilters="False"
                                                                    ShowFieldFilters="True"/>
            <telerik:GridViewDataColumn
                x:Name="functionColumn" IsFilterable="False" IsSortable="False"                    
                <telerik:GridViewDataColumn.CellTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <Button Style="{StaticResource ImageButtonStyle}" Click="DeleteItemButton_Click" CommandParameter="{Binding Path=ItemId}">
                            </Button>
                        </StackPanel>
                    </DataTemplate>
                </telerik:GridViewDataColumn.CellTemplate>
            </telerik:GridViewDataColumn>
        </telerik:RadGridView.Columns>
    </clxControls:ClxRadGridView>
0
Dimitrina
Telerik team
answered on 29 Nov 2011, 03:20 PM
Hello Predrag,

 Indeed we had a similar issue with rendering of the columns. We believe that we have fixed it in our latest internal build (version 2011.3.1129). 

Please check if you are able to reproduce the same behaviour with the latest assemblies. 

All the best,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Predrag
Top achievements
Rank 1
answered on 29 Nov 2011, 05:15 PM
Hello Didie,

I tried with latest internal build and it look like the issue is fixed, also now you can shrink column that has with=*, but you can not extend the last column.

Best regards,
Predrag



Tags
GridView
Asked by
Dmitry
Top achievements
Rank 1
Answers by
Predrag
Top achievements
Rank 1
Dimitrina
Telerik team
Share this question
or