I am trying to move from DataSet to UltraDataSource as initial tests suggest it is faster and uses less memory.
When I was using DataSet i had one Root Level table with (for this example's sake) two child tables.
Relations were added to the DataSet to map each child table's rows to one root table row ie for every child table it had its own root table row.
As a rsult each group of child rows in the UltraGrid had its own unique set of columns (obtained from the respective 'child table').
I have now implemented the UltraDataSource but cannot work out how to have different headers / columns for the child rows in the ultragrid. Please can someone guide me?
Hi,
You seem to have solved the issue on your own, which is good.
But I just wanted to give you a head's up that having a different child band for each parent row could potentially cause you some performance problems down the road.
You are correct that, in general, the UltraDataSource is faster than a DataSet. This is because the UltraDataSource relates parent and child rows directly wheras the DataSet has to calculate the child rows based on the Relationship every time it's needed. It's also because the UltraDataSource doesn't track changes to the data or have support for other database-specific features.
But the BindingManager in DotNet typically starts to have performance problems once you reach a certain threshhold in terms of the number of bands in your data source. So if your data is apt to get very large, you might want to consider other (perhaps unbound) options.
I believe i have found the answer through trial and error:
By subscribing to the event "BeforeRowExpanded" i can "GetChildRows" for a specified Band. I therefore create the band in the UltraDataSource initialisation and simply reference the required band in this method call.