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
1205
Adding child rows to a row
posted

Hi,

I'm trying to add child rows to a row but am getting a little confused as to how to go about it correctly.  I'm currently using an UltraDataSource which has 1 childBand, I can add rows to the parent Band by simply using the UltraDataSource.Rows.Add() method but I can't see how to add rows to the child Band.  Can anyone point me in the right direction??

Cheers,

Denis

Parents
  • 45049
    posted

    Child rows in WinDataSource are contained underneath the rows that they're children of.

    Your first step is to find the UltraDataRow object that your new UltraDataRow will appear underneath.  From this, call the GetChildRows() method of that parent UltraDataRow, passing in the reference, string key, or index of the UltraDataBand to which your new row will belong - this is relevant if you have multiple bands at the same level.  The method will return a collection of UltraDataRow objects, to which you can add your new row.

    I'll follow up this post with an example momentarily.

Reply Children