We have a complex data model with a lot of foreign key dependencies between the tables. Our entities have several navigation properties (lists), some of them are recursive.
We have several grids to present the entities. Each of them uses only one (a different one in each grid) navigation property to show a hierarchical table.
We need the same columns in each band, therefore we create the columns and the bands manually, and we attach the same range of columns to the bands. We set the NewBandLoadStyle and the NewColumnLoadStyle to Hide.
It works with MaxBandDepth=3, but not with 6. It takes too long untill the results are presented after the setting of the DataSource property (using a BindingSource). The grid generates hundreds of hidden bands.
We want to avoid the implementing of an ITypedList or the inheritance of entities just for presentation purposes.Is there a possibility to tell the grid not to generate new bands at all?
I'm a little unclear on what you are doing. Your description is very high-level, so it's hard to say exactly what you mean here.
If you are setting MaxBandDepth to 6 and the grid is creating hundreds of bands, then clearly something is wrong. Is this happening at design-time or run-time?
Are these bands actually below level 6? Or are they sibling bands? MaxBandDepth only limits the depth of the bands, it doesn't actually limit the number. If you have 100 sibling bands on level 2, MaxBandDepth won't help.
To answer your question... no, there is no way to stop the grid from generating bands (other than using MaxBandDepth). If the band exists in the data source, the grid will create it.
Depending on the needs of your application, though, you might want to consider using UltraTree instead o UltraGrid. UltraTree lacks certain grid features like filtering and summaries. But it does allow you to pre-define the data structure so you can avoid creating extra bands/columns that you don't want.
Hi Mike,
this is happaning both at design-time and run-time. For recursive hierarchical grids we do not use the designer at all. It mess the code up with countless bands, columns and apperiances.
I don't know whether all the bands are above level 6, but many of them are correct. They are siblings of the siblings. The number of the bands grows exponential to MaxBandDepth. That's what happens wenn a recursive table references an other recursive table directly or over other tables. In our use case we do not need these relations, but they are in the database. We need them in other use cases.
Unfortunately, filtering, summaries, etc. are essential, so the UltraTree does not helps. The only way were, to tell the grid what to display and to ignore all other informations. It is the same problem as with complex DataSets. It is possible to filter the columns in the DataViews, but not the relations.
I'm sad to hear, that the UltraGrid is not able to handle our complex recursive data. It seems, we have to differentiate the data sources.Thanks anyway for the Answer
Jabor
Hello Jabor,
If you have any other questions regarding our controls do not hesitate to ask.
Sincerely,
Danko Valkov
Developer Support Engineer, MCTS
Infragistics
www.infragistics.com/support
jabor said:On the other hand it has no DataSource Property (it is the source itself), we have to fill it Row by Row (Cell by Cell). It means, we have to copy our data.
No, you don't need to do that. Or, at least, you don't need to do it all at once. The point of using UltraDataSource in OnDemand mode is that you only load the data as it is requested. So yes, it's a copy of some of the data, but you only copy the data that is needed as it is needed.
Hi Mike, Hello Danko,
I will give Mike's suggestion a try.We have tested the UltraDataSource for years ago. It supports LoadOnDemand and has OnBefore events for editing. On the other hand it has no DataSource Property (it is the source itself), we have to fill it Row by Row (Cell by Cell). It means, we have to copy our data.
This is a bit difficult in our DataAccessLayer. We are using special lists, which are synchronized with a global DataContext (similar to LinqToSql). I have to check which is easier: to synchronize the UltraDataSource or to implement ITypedList in our lists. Relating to dynamic refresh I hope to be spared from problems like in http://forums.infragistics.com/forums/p/32156/175510.aspx