Posted 19 September 2017, 10:28 am EST
Hi all,
I’ve created a very simple test application to get familiar with the C1DataGrid for WPF, and I’m experiencing extreme performance problems. The application does nothing special: I started with only 3 columns and 100 rows.
When I maximize the window it takes more than one second to redraw the window! It seems to me, that it has something to do with the re-layout of the columns. 10.000 rows make no difference, but 6 columns instead of 3 double the delay.
What can I do to improve performance?
Please see in the attached screenshot, how the effect looks like.
This is my xaml:
[xml]
[/xml]<Grid> <my:C1DataGrid HorizontalAlignment="Stretch" Name="C1DataGrid1" VerticalAlignment="Stretch" /> </Grid>
This is the code behind:
[vb]
Class MainWindow
''' <summary> ''' Item with random values ''' </summary> ''' <remarks></remarks> Public Class RandomItem Public Property Number As Integer = CInt(Rnd() * 1000) Public Property Text As String = "Text " & CStr(CInt(Rnd() * 1000)) Public Property [Boolean] As Boolean = CBool(CInt(Rnd())) End Class ''' <summary> ''' Constructor ''' </summary> ''' <remarks></remarks> Public Sub New() MyBase.New() ' This call is required by the designer. InitializeComponent() ' Add any initialization after the InitializeComponent() call. Dim list As New List(Of RandomItem) For i As Integer = 1 To 100 list.Add(New RandomItem) Next C1DataGrid1.ItemsSource = list End Sub
End Class
[/vb]
Thanks for help,
Christian