This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi There, 1) It is seemed very slow for the DataGrid to update when ItemsSource is DataView when the record is more than 50 items and column number is more than 30. You can see the delay just to maximize the window or come back to normal window. Or you can see it just drag the scrollbar on DataGrid. our record is easily can be more than a few hundreds or thousands on the DataTable or DataView. So it is a SHOW-STOP for our clients. I can imagine it will be same problem even it is not DataTable or DataView. Same record used in the Win forms DataGridView it is much much fast and smooth. Please try to improve the performance as much as you can. 2) How to hide the Frozen Line of DataGrid? Thanks Gordon |
|
|
To be fair and see the effects, I create a testing projects and you can see the slowness. It is using 1000 records and 50 columns. My colleague just said in this situation, it is very easy to reach 100 columns. And the column is dynamicly created. I accidently put 2 dataGrid on MainWindow as:
You need to comment out one in the main window in the zip file. The DataGrid from .Net 4.0 from Microsoft is much fast. The WinForm one is fatest. |
|
|
Hi guys, Just as a heads up, we'll get Jason to have a look into this (he's the perf ninja and will be able to help more than anyone else) however he is away until Monday next week (New Zealand time, your Sunday). So his response will be slightly slower than you're used to from him. Thanks for the repro, it will help. Kind regards, John-Daniel Trask |
|
|
Hello Gordon The cause of the performance lag is the auto-sizing columns. Auto sizing is an expensive feature. If you turn off auto sizing columns in your DataGrid (Line 798 of CmostPlusDataGrid) you will see a significant improvement to the performance. When the columns are being auto-sized, we disable the column virtualization because the size of the columns outside the view port are unknown. The reason why the WinForms DataGridView runs fast is because it probably has an out-of-viewport column width estimation. This is a mechanism that we do not currently implement, but would like to in the near future. It will take some time before we can implement this. I'll let you know when this is available. For now, I hope you can temporarily stop using auto-size columns for better performance. As for the frozen columns, just to clarify: are you using the frozen columns feature (have at least 1 frozen column), but don't want the frozen line to be displayed at all? Also, I noticed you have a dictionary to map additional data to each column. We actually do have a Tag property on columns which you may want to use instead. Jason Fauchelle |
|
|
Thanks Jason. I did what you suggested, it is faster than before, but we can still see the lag when you maximize the window and have some lag when you try to drag the scroll bar on the data grid. For the frozen column, I mean we need to have a property to set if the frozen line to display at all when we have at least one frozen column. Thanks for the suggestions on Tag, I will take into considerations. Since our column is dynamically created, so I will try to use DataGrid's Tag. Is Dictioanry property is much slower than Tag? Thanks Gordon |
|
|
Hello Gordon We'll look into improving the performance of the DataGrid where possible. Note that after the initial lag with scrolling, the performance gets smoother. We'll look into removing the initial scrolling lag for a better experience. In the next nightly build you'll find a ShowFrozenLine property on the DataGrid. (Not to be mistaken with the ShowFirstFrozenLine property). Set this to false to hide the frozen line. The performance difference between Dictionary and Tag is insignificantly small. Tag is best, and would be more convenient to work with. Jason Fauchelle |
|