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
4032
How move child row from one parent row to another parent row
posted

I have a grid with 3 bands bound to a UltraDataSource object.

Band 0 shows department data. Band 1 shows employee data and every row has always one child row in band 2. Users can expand/collapse band 1 to show / hide the data in band 2.

My problem is that users can add additional rows for each employee in band 1. Now in band 1 are row 0 and row 1 for the first employee, row 2 and row 3 for the second and so on.

The additional data in band 2 should always be shown after the last row of each employee in band 1. Therefore I have to move the childrow in band 2 from one parent to another parent.

What is the best way to achieve this?

I'm was looking for a way to remove the whole row and attach it to the other parent. If I could do this, I don't need to setup data, row hight, appearance again for all rows in band 2. But I could not find a way to do this. Should I operate on the data source or on the grid?

Thanks for your help.

Markus

Parents
  • 469350
    Offline posted

    Hi Markus,

    I'm having trouble following you. I understand you have three bands (Band 0, 1, and 2). And that every row in band 1 has exactly 1 and only 1 child row (in Band 2).

    mac_swit said:
    The additional data in band 2 should always be shown after the last row of each employee in band 1. Therefore I have to move the childrow in band 2 from one parent to another parent.

    Here's where you lost me. Let's take an example where you have a single row in band 0 with 2 child rows. Each child row has a single child row (grandchild  row).

    Row 0

         Row 0, 0

              Row 0, 0, 0

         Row 0, 1

              Row 0, 1, 1

    It sounds like what you want to do is this: 

     

    Row 0

         Row 0, 0 

         Row 0, 1

              Row 0, 0, 0

              Row 0, 1, 1

    If that's the case, then there's no way to do this in the grid. Row 0, 0, 0 is a child of Row 0, 0. You cannot change it's parent row in the grid - you would have to change it in the data source and then the grid would reflect that change.

Reply Children