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

Large columns can not render out

4 Answers 123 Views
GridView
This is a migrated thread and some comments may be shown as answers.
rui
Top achievements
Rank 1
rui asked on 05 Dec 2017, 11:06 AM

I use gridview to display a datatable, when columns count is 2000 and rows count is 100, the UI can not render out,

there is a compromise solution is divide the datatable and display them by many gridview side by side,but when drag the horizontal scroll bar,it is not smooth

How to raise the rendering efficiency of gridview

and is there a probably render limit of the gridview , how many columns and how many rows

 

4 Answers, 1 is accepted

Sort by
0
Vladimir Stoyanov
Telerik team
answered on 07 Dec 2017, 02:54 PM
Hello,

Is the UI Virtualization of the RadGridView enabled on your side? You can take a look at the UI Virtualization article in order to learn more about that. Note that the virtualization is enabled by default.

Keep in mind that the virtualization won't work properly if the RadGridView is placed in a control that measures its children with infinity such as ScrollViewer, StackPanel or Grid with RowDefinition Height="Auto" or ColumnDefinition Width="Auto".

You can also read the Tips and Tricks article to learn about more reasons for the Virtualization to be turned off and potential approaches for optimizing performance. Another thing you can check out is the Degraded Performance article.

Can you give these articles a try and let me know how that goes?

Regards,
Vladimir Stoyanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
rui
Top achievements
Rank 1
answered on 11 Dec 2017, 07:51 AM
Thanks for your answer

<telerik:RadGridView CanUserFreezeColumns="False"
                             Width="400"
                             Height="300"
                             CanUserSelect="True"
                             VirtualizingStackPanel.VirtualizationMode="Standard"
                             EnableColumnVirtualization="True"
                             EnableRowVirtualization="True"
                             VirtualizingStackPanel.IsVirtualizing="True"
                             IsReadOnly="True"
                             IsPropertyChangedAggregationEnabled="False"
                             ItemsSource="{Binding DebugData,Mode=OneWay}"
                             RowIndicatorVisibility="Visible"
                             ScrollViewer.HorizontalScrollBarVisibility="Visible"
                             ScrollViewer.VerticalScrollBarVisibility="Visible"
                             SelectionMode="Single"
                             ValidatesOnDataErrors="InEditMode"
                             SelectionUnit="FullRow"
                             ColumnWidth="10"
                             DataLoadMode="Asynchronous"
                             ShowGroupPanel="False" />

the gridview's logic tree is  RadRibbonWindow/Grid/UserControl/RadDocking/RadSplitContainer/RadPaneGroup/RadPane/UserControl/Grid/RadTabControl/tabitem

and the grid is with out columnDefinitions

it looks is not placed in a control that measures its children with infinity 

 i implement all the key points but it also can not render out
0
Vladimir Stoyanov
Telerik team
answered on 12 Dec 2017, 04:27 PM
Hello,

Using "Asynchronous" DataLoadMode is not recommended as suggested in the Tips and Tricks article. Can you remove the setter of the property and leave it to fallback to its default value, and let me know how it goes? I am attaching a sample project of a RadGridView bound to a DataTable which renders as intended. Can you take a look at it and see how it differs from your project?

I look forward to your reply.

Regards,
Vladimir Stoyanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
rui
Top achievements
Rank 1
answered on 13 Dec 2017, 07:51 AM
Thanks for your help! 

I have find the reason by the help of project you support 

In my project the Gridview is in the TabItem  I set the RadTabControl's  IsContentPreserved="True" then the gridview render out 
Tags
GridView
Asked by
rui
Top achievements
Rank 1
Answers by
Vladimir Stoyanov
Telerik team
rui
Top achievements
Rank 1
Share this question
or