G
Greg
Our DataSource is a DataSet with 2 DataTables. Call them Table1 and Table2.
Table1 is the parent in a DataRelation to Table2. Table1's key is Field1
while Table2's key is Field2. So the DataRelation is Table1.Field1 to
Table2.Field2.
When we call AddNew on Table2 (the child), Table2's key, Field2, always
equals Table1.Field1. We tried setting DefaultValue on Table2.Field2,
however instead of the DefaultValue it is still Table1's Field1 value.
So it appears that the DataRelation forces the New, detached, DataRow to use
the parents key for it's key. Why?
Table1 is the parent in a DataRelation to Table2. Table1's key is Field1
while Table2's key is Field2. So the DataRelation is Table1.Field1 to
Table2.Field2.
When we call AddNew on Table2 (the child), Table2's key, Field2, always
equals Table1.Field1. We tried setting DefaultValue on Table2.Field2,
however instead of the DefaultValue it is still Table1's Field1 value.
So it appears that the DataRelation forces the New, detached, DataRow to use
the parents key for it's key. Why?