DataGrid Problem

  • Thread starter Thread starter Pranav Shah
  • Start date Start date
P

Pranav Shah

I have a windows form that uses a dataset with two DataTables. The
Master table values for each row are displayed in textboxes. The Detail
are shown in a DataGrid.
They are related through a DataRealation based on OrderID. My problem
is that when new values are inserted into the DataGrid I need to insert
the OrdereID value automatically, I am not sure how??
 
Pranav,

What do you mean by the OrderID? If this is the foreign key (that links
to the master table) then you will have to get the currently selected record
(obtained through the binding context), and then populate the child records
yourself.

The binding context is what you will want to use to determine what the
current master record is.

Hope this helps.
 
I do not know Binding Context very well. Could you give me a small
example of what you are saying.
Thanks,
Pranav
 
Back
Top