Hi,
I'm using a Dataset containing two tables, e.g. Person, Customer.
Table Person has some Fields like PersonId, LastName, FirstName, Adress,
etc. My Table Customer has two fields fk_person and CustomerNo. I have
an DataRelation with these tables between field PersonId and fk_person.
Further, I have added the columns LastName and FirstName to my DataTable
Customer, which is connected to the DataRelation.
All I want to do know, is to display the Customer table with the fields
of the person table in a datagrid. When I bind this DataTable to a
dataGrid instance, I can see all the fields I want to see, but I can't
edit the fields of the person table, e.g. LastName. Now, I know that
binding to a DataRelation is somehow like binding to a dataview. But
how can I make my person tables's field writeable anyway ? Any idea, or
is it impossible to edit these fields ? Is there another way to connect
these two tables in the Dataset ? I don't want to join these two tables
in database, because I want to use the command builder functionality of
the dataadapter, which only can be used when data comes from not more of
one table.
Any tips or other ways to go ?
Thanks in advance,
Patrick
|