When i load a 1.6 MB xml file to my grid and i use CollapseAll(true) or ExpandAll(true) it freezes the application. (not with a smaller file)
It doesn't matter how many rows are expanded. If i try CollapseAll(true), the app is not responding !
code: this.ultraGrid.Rows.CollapseAll(true);
What's the limit ? Or what's wrong ?
Hi Ajay,
The issue you are reporting is not exactly the same, but it's similar. And I doubt there's anything you can do about it.
The issue is that by calling ExpandAll, you are forcing the grid to load all of the data from the DataSet all at once. And the DataSet just isn't very fast when calculating the relationships. When you ask for the children of a particular parent row, the data set has to loop through every row in the child table and evaluate each one to see if it's a match. It has to do this for every parent row, and in your case, every child row (since there are grandchild rows.
This is why the delay only happens the first time - because after the first time, the data is already loaded and doesn't need to be loaded again.
Hi Mike,We are having the same issue. I have created a sample project. Please run the sample and click on "Expand All" button, you will notice that it will take approx 2-3 seconds first time. Any subsequent tries are faster (almost instant). Can you please have a look as to why this task so long the very first time?Is there any way where we can make this faster?
If you can post a small sample project demonstrating this, then we could check it out and tell you why it's slow. But without a sample, I'm afraid I am out of guesses.
Thanks. But i couldn't fix it sofar. It remains very slow, even with al the suggestions from the performance guide.
CollapseAll(false) works very fast. But it remembers it's previous state :-)))
Hi,
A screen shot doesn't really help. You might want to check out some of the other sections of the performance guide. There's some information there about other reasons why the grid might lock up, such as not using a BindingSource, or turning off SynchWithCurrencyManager.
The grid might also freeze up if you have a very large number of bands. MaxBandDepth will solve that problem in a recursive data source, but if you are adding hundreds of bands to the grid on the first 5 levels, then MaxBandDepth would not have any effect.