开发者

How does datagridview handle "Master / Detail"?

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 开发者_C百科can i do it(I don't use DataTables because they suck)?

thanks.


Here are some articles/papers on how Master-Detail relationship can be implememted with business objects(classes):

http://www.codeproject.com/KB/grid/Bindinglist.aspx

http://msdn.microsoft.com/en-us/library/aa581795.aspx


bind the two grids to the respective master/detail database tables and set the corresponding primary/foreign key fields using the DataKeyNames attributes

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜