Hi everyone,
I have an ado.net dataset that uses a foreign key on itself to indicate hierarchy (parent/child rows). Because of this reference, the grid creates about 200 bands and the performance is abysmal.
The application itself (through visual basic 2010 in debug mode) runs but has about a 3-5 second load (to simply load the grid with 10 rows in it).
When I open the ultrawingrid designer I see that there are between 200 - 300 bands created and if I change a property of the grid visual studio either crashes or takes about a minute to commit.
We are using the latest netadvantage winforms version including the hotfix and our programming environment is Visual Studio 2010.
I have also tried setting the maxbands in the display layout to 3 but apparently it is ignored.
Any help is appreciated because it is quite a performance bottleneck at the moment.
You should set MaxBandDepth. The property is not just ignored, so if it's not working, then something is wrong.
Are you setting it at run-time or design-time? You should be setting it at design-time, and you also need to make sure that you are properly binding the grid at run-time in such a way that you do not lose the design-time layout. This means making sure that you use the SetDataBinding method and also that your data structure at design-time matches up to the one at run-time.This is explained in more detail here:
HOWTO:How can I define columns in the grid at Design-time and bind them at run-time so that some fields of the data are excluded from the grid?
Thank you mike, for the quick reply. I don't know what happened but the MaxBandDepth didn't work until I rebooted Visual Studio. But it seems to work now, saves a lot of load time and developing time since the designer screen kept crashing.