Windows Forms DataGrid .NET
Hi!
I have a problem with the Datagrid.
It is easily reproducable using the VS.NET Data Form wizard:
1) With the wizard, generate a Master-
detail application againt the Microsoft 'pubs' database.
2) Use the publishers and titles tables, and tell the
wizard to show both the master and the detail records in a
grid.
3) Make sure, that the Allow_Navigation property of the
Master grid is set to true.
4) Run the application. Add a new row to the publishers,
for example pub_id=9910,...
5) Without clicking on another master record, navigate to
the child record of the newly created master record.
6) You'll notice, that the pub_id field of the new titles
record is null, and not set to 9910.
(The same if you go to the titles grid.)
1) Terminate the appl. and set the DataSource property of the
titles grid (child grid) to none.
2) Rerun the application and repeat the above scenario:
You'll see that now the pub_id field of the new titles
record is properly initialized to 9910.
Can somebody tell me, how to get around this problem? (Is
there a bug somewhere or do I miss something?)
Thank you!
Antal Pak
|