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

RadGrid is Sqeezing when populated large data.

3 Answers 72 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Parul
Top achievements
Rank 1
Parul asked on 09 Jun 2011, 05:22 PM
Hi All,

I am working on WPF 4.0 and using telerik grid in it.

The following Style i have applied for the Radgridview in my application.
<!-- Telerik Data Grid Style Definations -->
   <Style TargetType="telerik:GridViewHeaderCell">
       <Setter Property="Background" Value="{StaticResource MainHeaderColor}"/>
       <Setter Property="BorderBrush" Value="#D4D6D6"/>
       <Setter Property="BorderThickness" Value="1"/>
       <!--Setter Property="Height" Value="27"/-->
       <Setter Property="VerticalContentAlignment" Value="Center" />
       <Setter Property="HorizontalContentAlignment" Value="Center" />
   </Style>
     
   <Style x:Key="GridViewHeaderRowStyle" TargetType="{x:Type telerik:GridViewHeaderRow}">
       <Setter Property="Background" Value="White"/>
       <Setter Property="BorderBrush" Value="#D4D6D6"/>
   </Style>
     
   <Style x:Key="AlternateRowStyle" TargetType="{x:Type telerikGridView:GridViewRow}">
       <Setter Property="Background" Value="#E3F0F9" />
       <Setter Property="BorderBrush" Value="#D4D6D6" />
       <!--Setter Property="Height" Value="30"/-->
   </Style>
     
   <Style x:Key="GridViewRowStyle" TargetType="{x:Type telerikGridView:GridViewRow}">
       <Setter Property="Background" Value="White" />
       <Setter Property="BorderBrush" Value="#D4D6D6" />
       <!--Setter Property="Height" Value="30"/-->
   </Style>
   <Style x:Key="DataCellsPresenter" TargetType="{x:Type telerik:GridViewHeaderRow}">
       <Setter Property="Background" Value="{StaticResource MainBackgroundColor}" />
       <Setter Property="BorderBrush" Value="#D4D6D6" />
   </Style>
   <DataTemplate x:Key="GridViewHeaderIndentCellDataTemplate">
       <telerik:GridViewHeaderIndentCell BorderBrush="#D4D6D6"/>
   </DataTemplate>
   <DataTemplate x:Key="GridViewHeaderIndicatorPresenterTemplate">
       <telerik:IndicatorPresenter  x:Name="PART_IndicatorPresenter" 
                                            Background="{StaticResource MainBackgroundColor}" 
                                            BorderBrush="{StaticResource SeperatorColor}" 
                                            BorderThickness="1"
                                            Grid.Column="0" HorizontalAlignment="Left" 
                                            Width="24"/>
   </DataTemplate>
   <!-- Telerik Data Grid Style-->
   <Style TargetType="{x:Type telerik:RadGridView}">
       <Setter Property="HeaderRowStyle" Value="{DynamicResource GridViewHeaderRowStyle}"/>
       <Setter Property="AlternateRowStyle" Value="{DynamicResource AlternateRowStyle}"/>
       <Setter Property="IsFilteringAllowed" Value="false"/>
       <Setter Property="RowStyle" Value="{DynamicResource GridViewRowStyle}"/>
       <Setter Property="GridLinesVisibility" Value="Both"/>
       <Setter Property="Cursor" Value="Hand"/>
       <Setter Property="Background" Value="White" />
       <Setter Property="VerticalGridLinesBrush" Value="#D4D6D6"/>
       <Setter Property="HorizontalGridLinesBrush" Value="#D4D6D6"/>
       <!--Setter Property="MinColumnWidth" Value="20"/-->
       <!--Setter Property="MaxColumnWidth" Value="150"/-->
       <!--Setter Property="ColumnWidth" Value="100"/-->
       <Setter Property="RowIndicatorVisibility" Value="Collapsed"/>
       <!--Setter Property="RowDetailsVisibilityMode" Value="VisibleWhenSelected"/-->
       <Setter Property="AlternationCount" Value="2"/>
       <Setter Property="VerticalAlignment" Value="Top"/>
       <Setter Property="HorizontalAlignment" Value="Center"/>
       <Setter Property="ShowGroupPanel" Value="False"/>
       <Setter Property="AutoGenerateColumns" Value="False"/>
       <Setter Property="IsReadOnly" Value="True"/>
       <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
       <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
       <Setter Property="IsScrolling" Value="false"/>
         
       <Setter Property="Margin" Value="0,0,0,0"/>
   </Style>

Now when I am using this Radgrid in my application and opening the screen then at that time the grid first squeeze and then open up in the screen withits full width.In some screens its also giving a jerking effect and then opening properly.

Kindly let me know why is it happening so ?

Thanks in advance !!!!!!

3 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 10 Jun 2011, 09:24 AM
Hi Parul,

Could you please check if those effects can be seen if all custom templates and styles are removed? Also, it will be great if we can have a loot at the XAML where the grid is defined . 


Greetings,
Milan
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
0
Parul
Top achievements
Rank 1
answered on 10 Jun 2011, 10:07 AM
hI Milan !!!

Thanks for the reply. Yes the normal grid without style does not give this jerking effect.After applying these styles may be it is giving this.Not abble to conclude the final reason.Following is the code for the Rad grid in XAML.

<telerik:RadGridView Grid.Row="3"
         x:Name="gvOrderForwards" ItemsSource="{Binding orderforward}" SelectionChanged="gvOrderForwards_SelectionChanged">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn  Header="Order Item ID" DataMemberBinding="{Binding OrderItemId}" SortingState="Ascending" Width="*" TextWrapping="NoWrap"/>
                <telerik:GridViewDataColumn  Header="Customer" DataMemberBinding="{Binding Customer}" Width="*" TextWrapping="NoWrap"/>
                <telerik:GridViewDataColumn  Header="Product" DataMemberBinding="{Binding Product}" Width="*" TextWrapping="NoWrap"/>
                <telerik:GridViewDataColumn  Header="Forward Order Item ID" DataMemberBinding="{Binding FwdOrderItemId}" Width="*" TextWrapping="NoWrap"/>
                <telerik:GridViewImageColumn Header="Status" DataMemberBinding="{Binding Status}" >
                      
                </telerik:GridViewImageColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
0
Dimitrina
Telerik team
answered on 14 Jun 2011, 08:26 AM
Hello Parul,

 I have created a sample project in an attempt to reproduce the behavior that you face. There is a squeeze in both scenarios - with or without your custom styles, but it is due to the fact that a lot of UI needs to be recreated. I was not able to reproduce any jerking though. I have added 100000 items to the GridView. As well I have used another colors for the Background properties of the styles, because I do not have your custom static colors.

Could you please review the sample project and share with us if this is the squeezing behavior? If not - may you please change the sample application so that we could see how exactly the squeezing and jerking happen?

Regards,
Didie
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
Parul
Top achievements
Rank 1
Answers by
Milan
Telerik team
Parul
Top achievements
Rank 1
Dimitrina
Telerik team
Share this question
or