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

RadGridView with 5 level of grouping : white space issue

1 Answer 31 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jeremy
Top achievements
Rank 1
Jeremy asked on 07 Sep 2018, 02:13 PM

Hi everyone, 

 

I have a GridView with 5 grouping, lots of data. When I expand the last level of grouping, I have this weird white space. 

The issue is not present when I set the GroupRenderMode to Nested but the performance become terrible.

No difference when I change the value of AutoExpandGroups.

here is the code : 

<telerik:RadGridView x:Name="GridViewListingNumberList" GroupRenderMode="Flat"
                     VerticalAlignment="Top" VerticalContentAlignment="Top"
                     telerik:StyleManager.Theme="Windows"
                     Background="Transparent"
                     ColumnBackground="Transparent"  AlternationCount="2" SelectionUnit="FullRow"
                     ItemsSource="{Binding List.Presenter.ResultDisplay}"
                     MaxHeight="900" Margin="5,5,5,10"
                     CanUserFreezeColumns="False" AutoExpandGroups="False"
                     RowIndicatorVisibility="Collapsed"
                     AutoGenerateColumns="False"
                     IsReadOnly="True"
                     MouseDoubleClick="shareGrid_MouseDoubleClick"
                     ShowGroupPanel="true">
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn IsVisible="true" Header="Marché" UniqueName="MarketName" Width="auto"  DataMemberBinding="{Binding MarketName}" IsReadOnly="True" ShowColumnWhenGrouped="False">
            <telerik:GridViewDataColumn.GroupHeaderTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Group.Key, StringFormat='Marché: {0}'}" VerticalAlignment="Center"/>
                </DataTemplate>
            </telerik:GridViewDataColumn.GroupHeaderTemplate>
        </telerik:GridViewDataColumn>
        <telerik:GridViewDataColumn IsVisible="true" Header="Payeur" UniqueName="PayerName" Width="auto"  DataMemberBinding="{Binding PayerName}" IsReadOnly="True" ShowColumnWhenGrouped="False">
            <telerik:GridViewDataColumn.GroupHeaderTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Group.Key, StringFormat='Payeur: {0}'}" VerticalAlignment="Center"/>
                </DataTemplate>
            </telerik:GridViewDataColumn.GroupHeaderTemplate>
        </telerik:GridViewDataColumn>
        <telerik:GridViewDataColumn IsVisible="true" Header="Périodicité" UniqueName="PeriodicityName"  Width="auto"  DataMemberBinding="{Binding PeriodicityName}" IsReadOnly="True" ShowColumnWhenGrouped="False">
            <telerik:GridViewDataColumn.GroupHeaderTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Group.Key, StringFormat='Période: {0}'}" VerticalAlignment="Center"/>
                </DataTemplate>
            </telerik:GridViewDataColumn.GroupHeaderTemplate>
        </telerik:GridViewDataColumn>
        <telerik:GridViewDataColumn IsVisible="true" Header="Lot" UniqueName="MarketBatchName" Width="auto"  DataMemberBinding="{Binding MarketBatchName}" IsReadOnly="True" ShowColumnWhenGrouped="False">
            <telerik:GridViewDataColumn.GroupHeaderTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Group.Key, StringFormat='Lot: {0}'}" VerticalAlignment="Center"/>
                </DataTemplate>
            </telerik:GridViewDataColumn.GroupHeaderTemplate>
        </telerik:GridViewDataColumn>
        <telerik:GridViewDataColumn IsVisible="true" Header="Société" UniqueName="CompanyName2" Width="auto" DataMemberBinding="{Binding CompanyName2}" IsReadOnly="True" ShowColumnWhenGrouped="False">
            <telerik:GridViewDataColumn.GroupHeaderTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Group.Key, StringFormat='Société: {0}'}" VerticalAlignment="Center"/>
                </DataTemplate>
            </telerik:GridViewDataColumn.GroupHeaderTemplate>
        </telerik:GridViewDataColumn>
 
        <telerik:GridViewDataColumn Header="" Width="30"  SortMemberPath="Statut" IsReadOnly="True">
            <telerik:GridViewDataColumn.CellTemplate>
                <DataTemplate>
                    <TextBlock x:Name="OutwardTextSPState" Width="20" TextAlignment="Center">
                        <TextBlock.Style>
                            <Style TargetType="TextBlock" BasedOn="{StaticResource SmallFontStyle}">
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding Statut}" Value="TOTELETRANSMIT">
                                        <Setter Property="Text" Value="ÀT" />
                                        <Setter Property="ToolTip" Value="À TÉLÉTRANSMETTRE" />
                                        <Setter Property="Background" Value="{StaticResource HighlightBackgroundBrush}" />
                                    </DataTrigger>
                                    <DataTrigger Binding="{Binding Statut}" Value="TELETRANSMITED">
                                        <Setter Property="Text" Value="T" />
                                        <Setter Property="ToolTip" Value="TÉLÉTRANSMISE" />
                                        <Setter Property="Background" Value="{StaticResource GreenBackgroundBrush}" />
                                    </DataTrigger>
                                    <DataTrigger Binding="{Binding Statut}" Value="TOVALIDATE">
                                        <Setter Property="Text" Value="ÀV" />
                                        <Setter Property="ToolTip" Value="À VALIDER" />
                                        <Setter Property="Background" Value="{StaticResource RedBackgroundBrush}" />
                                    </DataTrigger>
                                    <DataTrigger Binding="{Binding Statut}" Value="PRINTED">
                                        <Setter Property="Text" Value="I" />
                                        <Setter Property="ToolTip" Value="IMPRIMÉE" />
                                        <Setter Property="Background" Value="{StaticResource AlternateGreenBackgroundBrush}" />
                                    </DataTrigger>
                                    <DataTrigger Binding="{Binding Statut}" Value="TOPRINT">
                                        <Setter Property="Text" Value="ÀI" />
                                        <Setter Property="ToolTip" Value="À IMPRIMER" />
                                        <Setter Property="Background" Value="{StaticResource YellowBackgroundBrush}" />
                                    </DataTrigger>
                                    <DataTrigger Binding="{Binding Statut}" Value="PAID">
                                        <Setter Property="Text" Value="P" />
                                        <Setter Property="ToolTip" Value="PAYÉE" />
                                        <Setter Property="Background" Value="{StaticResource PurpleBackgroundBrush}" />
                                    </DataTrigger>
                                    <DataTrigger Binding="{Binding Statut}" Value="PARTIALLYPAID">
                                        <Setter Property="Text" Value="PP" />
                                        <Setter Property="ToolTip" Value="PAYÉE PARTIELLEMENT" />
                                        <Setter Property="Background" Value="{StaticResource VeryLightPurpleBackgroundBrush}" />
                                    </DataTrigger>
                                    <DataTrigger Binding="{Binding Statut}" Value="CREDIT">
                                        <Setter Property="Text" Value="A" />
                                        <Setter Property="ToolTip" Value="CREDIT" />
                                        <Setter Property="Background" Value="{StaticResource BlueGreenBackgroundBrush}" />
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </TextBlock.Style>
                    </TextBlock>
                </DataTemplate>
            </telerik:GridViewDataColumn.CellTemplate>
        </telerik:GridViewDataColumn>
        <telerik:GridViewDataColumn Header="" Width="auto" DataMemberBinding="{Binding Number}" IsReadOnly="True"/>
        <telerik:GridViewDataColumn Header="Nom/Prénom" Width="auto" MinWidth="100" DataMemberBinding="{Binding CustomerFullName}" IsReadOnly="True"/>
        <telerik:GridViewDataColumn Header="Date"       Width="auto" MinWidth="100" DataMemberBinding="{Binding Date, StringFormat={}{0:dd/MM/yyyy}}" IsReadOnly="True" SortingState="Ascending"/>
        <telerik:GridViewDataColumn Header="Montant"    Width="auto" MinWidth="100" DataMemberBinding="{Binding Amount, StringFormat={}{0:C}}"            IsReadOnly="True"/>
        <telerik:GridViewDataColumn Header="Trajet"     Width="*" MinWidth="100" DataMemberBinding="{Binding Trip}"             IsReadOnly="True"/>
        <telerik:GridViewDataColumn Header="Vehicule"   Width="auto" MinWidth="100" DataMemberBinding="{Binding Vehicle}"          IsReadOnly="True"/>
        <telerik:GridViewDataColumn Header="Raison"     Width="auto" MinWidth="100" DataMemberBinding="{Binding Reason}"           IsReadOnly="True"/>
 
    </telerik:RadGridView.Columns>
 
    <telerik:RadGridView.GroupDescriptors>
        <telerik:ColumnGroupDescriptor Column="{Binding Columns[\MarketName\], ElementName=GridViewListingNumberList}"  />
        <telerik:ColumnGroupDescriptor Column="{Binding Columns[\PayerName\], ElementName=GridViewListingNumberList}"  />
        <telerik:ColumnGroupDescriptor Column="{Binding Columns[\PeriodicityName\], ElementName=GridViewListingNumberList}"  />
        <telerik:ColumnGroupDescriptor Column="{Binding Columns[\MarketBatchName\], ElementName=GridViewListingNumberList}"  />
        <telerik:ColumnGroupDescriptor Column="{Binding Columns[\CompanyName2\], ElementName=GridViewListingNumberList}"  />
    </telerik:RadGridView.GroupDescriptors>
</telerik:RadGridView>

 

v.2018.1.220.45

 

Any Idea ?

 

thanks.

https://i.imgur.com/XGtKWeK.png

here , a gif of the issue : https://imgur.com/a/mNGwYA7

 

1 Answer, 1 is accepted

Sort by
0
Vladimir Stoyanov
Telerik team
answered on 12 Sep 2018, 12:27 PM
Hello Jeremy,

Thank you for the attached pictures.

I tried to reproduce the described behavior on my side, however I was not able to do so. I am attaching the sample project that I used for testing along with a picture showing how the RadGridView looks on my end when grouped. May I ask you to check it out and let me know what you are doing differently on your side? If I can reproduce the behavior observed on your end, I will be able to investigate further and potentially suggest a solution. 

Thank you in advance for any help you can provide.

Regards,
Vladimir Stoyanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
Jeremy
Top achievements
Rank 1
Answers by
Vladimir Stoyanov
Telerik team
Share this question
or