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

Performance issue in grid view control

1 Answer 178 Views
GridView
This is a migrated thread and some comments may be shown as answers.
SUSHAMA
Top achievements
Rank 1
SUSHAMA asked on 09 Jul 2013, 10:08 AM
Hi,

I have 8 RadGridViews in my wpf application. I have used some properties of the RadGridView in the below code snippet. Each RadGridView is added inside an Expander.

When I select an item in a tree view, I change the Datacontext of the Expander. But the rendering of the control  takes too much of tne time. How do i improve the rendering performance of my RadGridViews?  Am i missing anything? Can anyone help.

<Telerik:RadGridView CanUserFreezeColumns="False"

                                                                     RowIndicatorVisibility="Collapsed"

                                                                     RowDetailsVisibilityMode="{Binding ElementName=root,Path=CanEdit.IsEnabled,IsAsync=True,Converter={StaticResource rowdetailsvisibilityconverter}}"

                                                                     RowDetailsTemplate="{StaticResource propertyEditTemplate}"

                                                                     ItemsSource="{Binding Properties}"

                                                                     AutoGenerateColumns="False"

                                                                     SelectionUnit="FullRow"

                                                                     SelectionMode="Single"

                                                                     DataContext="{Binding DataContext, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Expander}}}"

                                                                     Grid.Column="0"

                                                                     Name="propertyListView"

                                                                     VirtualizingPanel.IsVirtualizing="True"

                                                                     VirtualizingPanel.IsContainerVirtualizable="True">

                                                    <Telerik:RadGridView.ContextMenu>

                                                        <ContextMenu>

                                                            <MenuItem Header="Edit"  Command="ApplicationCommands.Replace">

                                                                <MenuItem.Icon>

                                                                    <Image Source="..\Images\Edit.png" Height="15" Width="20" Margin="0,0,2,0" />

                                                                </MenuItem.Icon>

                                                            </MenuItem>

                                                        </ContextMenu>

                                                    </Telerik:RadGridView.ContextMenu>

                                                    <Telerik:RadGridView.CommandBindings>

                                                        <CommandBinding Command="Replace" CanExecute="CommandBinding_NewTripAlarms" Executed="CommandBinding_EditProperties" />

                                                    </Telerik:RadGridView.CommandBindings>

                                                    <Telerik:RadGridView.InputBindings>

                                                        <KeyBinding Command="Replace" Key="Enter" />

                                                    </Telerik:RadGridView.InputBindings>

                                                    <Telerik:RadGridView.Columns>

                                                        <Telerik:GridViewDataColumn IsReadOnly="True" IsGroupable="False" IsFilterable="False" Header="{DynamicResource Name}" DataMemberBinding="{Binding Path=ModelProperty.PropertyName}" />

                                                        <Telerik:GridViewDataColumn IsReadOnly="True" Header="{DynamicResource DataType}" DataMemberBinding="{Binding Path=ModelProperty.DataType.Name}" />

                                                        <Telerik:GridViewDataColumn IsReadOnly="True" IsGroupable="False" IsSortable="False" IsFilterable="False" Header="{DynamicResource Value}" DataMemberBinding="{Binding Path=Value}" />

                                                    </Telerik:RadGridView.Columns>

                                                </Telerik:RadGridView>

regards,

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 10 Jul 2013, 06:33 AM
Hello Sushama,

Generally, an expander measures its children with infinity, which breaks the whole virtualization process. Please check out this article for a reference. 

Regards,
Maya
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
SUSHAMA
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or