Hello,
I have a two band UltraGrid in virtual mode. The data in my data source constantly change, including child record collections. It seems that the InitializeRowsCollection is only fired once for each parent row. Is there a way to force InitializeRowsCollection to fire again?
Thanks,Shaolin
Hi Mike,
Okay, it was my mistake that I thought GetChildRows would return all child rows for the specified child band.
Thanks so much,Shaolin
Hi,
You answered your own question. You use the GetChildRows method. This returns you the child rows collection of that row. Then you call SetCount on it.
I need the child row collection. Let's assume we have two bands. I have a row, called Row1, in the root band that have initially have five children, so there are five child rows under Row1. A few seconds later, two more children needs to add to this parent row Row1. I can get this Row1 from my UltraDataSource. Now I need to get the child row collection of Row1. I know Row1's child row collection have five items and I need to set its Count to 7.
Shaolin said:It seems I cannot find a method to get child UltraDataRow collection for a parent UltraDataRow object from UltraDataSource. UltraDataRow has a couple of GetChildRows methods and they return all child rows in a child band.
I'm not sure what you are asking. You seem to have answered your own question.
Shaolin said:How can I get the associated rows collection in the UltraDataSource, by going through all child data rows in the child band?
UltraDataRow has both a Parent and a ParentCollection property. Is that what you are looking for?
Thanks so much for your response!
It seems I cannot find a method to get child UltraDataRow collection for a parent UltraDataRow object from UltraDataSource. UltraDataRow has a couple of GetChildRows methods and they return all child rows in a child band.
Mike Saltzman said:All you need to do is get the associated rows collection in the UltraDataSource and call SetCount on that collection.
How can I get the associated rows collection in the UltraDataSource, by going through all child data rows in the child band?
My own data source only holds a list of top level records and each record contains a child collection. Of course, a child record can have its own children. I only know the number of records in the top level.
Your help is greatly appreciated!
Thanks again,Shaolin