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
744
I'm sure this is quite basic but I can't understand how to show subrecords based on a dataset.
posted

Ok,

So I've got a dataset with 2 tables:-

Table1:-
RecordID
UserName
Field1
Field2....

Table2:-
MasterRecordID   --- this matches with Table1.RecordID
Location
FieldX
FieldY
FieldZ...

So I'm using
myDataGrid.DataSource = myDataSource.tables[0].DefaultView; //this shows table1's data

So how do I inject Table2 records as child records to the matching records in table1 in the datagrid?

Any help would really be appreciated.

- Anthony

  • 69686
    posted

    Hello Anthony,

    The XamDataGrid will do this automatically but you need to create a relation between the two tables. You can see a nice example of this by Aaron Marisi here.