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?
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
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
Hi Jabor,
One other option you might consider is using the grid in virtual mode. What you would do is create an UltraDataSource component and define the data structure you want for the grid. You set the LoadStyle on the grid to OnDemand.
The UltraDataSource will then act as an intermediary between the grid and the "real" data, firing events when the grid requests or updates the data.
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