Hi,
I'm having some issues with the performance of the ultrawingrid. In my situation, I have a grid with a group by column and about 8000 rows. I need to loop through the individual rows to set values to some unbound columns. However, rather than the assigning of those values, just the looping through the rows (actually: getting the enumerator) causes a delay of a few seconds.
I created a small sample project demonstrating the problem. The project groups a column in the grid and fills it's datasource with 10000 rows. When clicking the test button, it refills the datasource, and loops through the rows. This takes a few seconds, and is too long for a smooth user experience.
My question is, how can I speed up the enumeration of the rows?
I already tried the SuspendUpdate and SuspendRowSynchronization as mentioned in the performance guide, but that didn't help. I also tried the GetRowEnumerator method, but that didn't help either. I hope you can. Thanks in advance.
I'm using version 10.3.20103.1000
I agree with you that using a background worker thread would not help, and could easily cause more problems.
I'm a little puzzled, though - when you use InitializeRow, when exactly is the delay? What exactly is delayed? The display of the form?
My guess is that your InitializeRow code is probably not as efficient as it could be, because setting the value of a cell in InitializeRow is very fast and should not cause any delay at all.
Can you post your code in InitializeRow?
Thanks for your reply. I've just tried the InitializeRow approach, but I still have the same delay in the UI (however I can't measure it anymore using a StopWatch). I don't think a background worker can help, because I still have to assign the values in the UI thread, which would freeze up the UI. Is there another way?
By the way, without grouping there is no delay. But unfortunately, our users need the grouping (because of the many rows).
Hello TorX,
I`m not sure what is your final goal, but do you think that it is possible to use ultraGrid1_InitializeRow() event, instead of Loop to set the values in your UnboundColumn ? Or maybe you could use UltraCalcManager to set the values in your UnboundColumn ? Of course you could try miltiple thread / backgroundworker to prevent hang up of your application.
Let me know if you have any questions.