Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
150
How to dynamically add child data?
posted

I will do my best to explain this senario.

I am using an UltraGrid to display data of which I will have no knowedge of at run time. I am parsing an xml file that will create a list of queries and their relations.

  1.  Call the first query right away and add the resulting datatable to a dataset.
  2. create a Child table(place holder for a child data) that has the same first column type as the parent table. Than create a datarelation object to create a relationship between the two tables and add the child and relation object to the dataset.
  3. Add the dataset to the UltraGrid.
  4. Now, when I click the expand button, using the BeforeRowExpand event, I get the related query from my query list, and call for the new child DATA from the database.
  5. I use the new DATA to update the child table inside the dataset. I append the missing column and than add the data to the child table.

when I run through this squence of events the child bands do not display. Is it possible to add child data to the UltraGrid and display it? Am I doing this out of order somehow? Does the data have to be there before the expand event fires? Can I get any alternate suggestions? My biggest problem seems to be that Data is completely dynamic.