I've got a DataGrid on a Windows Form that shows records from a child table.
It does not show the ParentID field, but I need it to fill the ParentID
field in with a particular number when the user adds a new row. As it is
now, when the user adds a new row and fills in the data, when they try to
move off the row they get an error saying the the ParentID field cannot be
null.
How can I fill in ParentID when a new row is added in the DataGrid? Just
for background information, I have a typed DataSet (dsTRO) generated from an
XML schema. dsTRO has two tables (call them Parent and Child). Parent has
an ID field and will always only have one record with an ID = 1. Child has
a ParentID field and will have zero or more records, all of which will have
ParentID=1. The only reason I even included the ID and ParentID fields was
to link the tables in Crystal Reports. The DataGrid shows all the fields in
Child except ParentID. I can add Parent ID with a column width of 0 if
needed.
-----
Lee Perkins
TigerBase Technologies
"Lee is one that would plug his brain into the internet, if he could, and STILL scream for more" - Very good friend of Lee's