I want to populate a datagrid with the result of: MySubRow.GetChildRows("MyRelation_Sub_Account")

Hi all,

I guess the function : Mydatarelation.getchildrows returns a list of child rows from a certain parent row in the parent table.

According to the selected parent Row, I want to put the resulting child rows in my datagrid. If I do this: I create MyRelation then:

MyDatagrid.datasouce= MySubRow.GetChildRows("MyRelation")

All I get are empty child rows in a datagrid like this:

RowError HasErrors
False
False

In my example, I only have 2 child rows corresponding to the parent Row.

What should I do please

Thanks for help.




Answer this question

I want to populate a datagrid with the result of: MySubRow.GetChildRows("MyRelation_Sub_Account")

  • cthistle

    Use a DataView properly filtered (like ParentId = [value of parent id]) on child table instead.

  • Addy

    Can you please explain a little bit more.And also if you have a VB code example. Thanks

    Thanks a lot for help



  • I want to populate a datagrid with the result of: MySubRow.GetChildRows("MyRelation_Sub_Account")