In .net objects like DataTable when you have two grids(Master and Detail) and add a row to the second one(Detail), The new row will have the Foreign-Key Values automatically.
How can i do it(I don't use DataTables because they suck)?
thanks.
views:
134answers:
2
A:
bind the two grids to the respective master/detail database tables and set the corresponding primary/foreign key fields using the DataKeyNames attributes
Alan Stephens
2010-02-25 16:21:12
Where is DataKeyNames defined?I can't find it.did you mean System.Web....?
Behrooz
2010-02-25 16:28:16
it's an attribute of the GridView class if that's what you using to render your data
Alan Stephens
2010-02-25 16:38:05
A:
Here are some articles/papers on how Master-Detail relationship can be implememted with business objects(classes):
Aseem Gautam
2010-03-25 09:14:27