Hi,
First, please excuse my english.
Is it possible to copy a UltraGridBand? Because I have a recursive datasource, a list<MyObject> and MyOBject contains a List<MyObject>, the composite design pattern. The UltraGrid seems to don't like this datasource, it freeze the PC, and I can't design columns or anything else.
So I would like to add band when it's necessary at runtime.
I've tryed to use the copy constructor such as UltraGridBand myBand = new UltraGridBand(oldUltaGridBand), but it doesn't exist, like The Clone() method.
I hope there is an issue to my problem, because UltraGrid and UltraBand components have a lots of properties, and I would not miss anyone.
Thanks in advance, I hope someone understand my english.
touftouf57 said:Is it possible to copy a UltraGridBand? Because I have a recursive datasource, a list<MyObject> and MyOBject contains a List<MyObject>, the composite design pattern. The UltraGrid seems to don't like this datasource, it freeze the PC, and I can't design columns or anything else.
No, you cannot copy a band.
The reason the PC is freezing is that your data source is infinite and the grid is trying to create all of the BindingManager objects up to the MaxBandDepth, which defaults to 100.
What you should do is set MaxBandDepth to a much smaller number. I recommend a setting of between 5 and 8.
That's what I've done. But the maxBandDepth, in the designer file, stayed at the default value 100.
To avoid PC's freeze, I remove the 98 last bands and the link to the datasource in a editor like notpad, and I restart visual studio.
Then, I can't copy a band. But I would like, that they have the same design, because they will show the same type of object. If I change something in the first band, I need to repeat the same seeting to the others?
Of course I will set the maxBandDepth between 5 and 8. I precise that a band contains 68 columns, and only 12 are visible. Set visible fields in 5 bands should be long.
And I don't know if the product owner wants differents colors, filters,....
Does a trick exist, to do this?