主/详细数据网格视图未加载? [英] Master/detail datagridview not loading?

查看:142
本文介绍了主/详细数据网格视图未加载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个datagridview控件,它们显示了主/详细关系,主控加载得很好,但细节未加载相对记录!
ps.该模型是使用设计器创建的(即,从数据库侧窗格中拖动)
请帮忙.

Hi, I have two datagridview controls showing a master/detail relationship, the master loads just fine, but the detail is not loading the relative records!
ps. The model was created using the designer, (ie. dragged from the database side pane)
Please help.

推荐答案

如果已建立父子关系,则在父gridview发生事件时,获取行ID.使用GetChildRows函数并将结果绑定到第二个datagridview.

有关更多信息,请 http://msdn.microsoft.com/zh-CN /library/w93sz26t%28v=VS.71%29.aspx [
If you have established the parent child relationship then at an event from the parent gridview get the row id. Use the GetChildRows function and bind the results to the second datagridview.

for more information http://msdn.microsoft.com/en-us/library/w93sz26t%28v=VS.71%29.aspx[^]


好吧,我不知道到底是什么问题,但是vs 2010似乎可以解决很好,如果有人发现问题所在,我仍然很想知道原因.
干杯.
Ok, i don''t know what exactly is the problem but vs 2010 seems to handle it just fine, I''m still interested to know the reason if somebody found out what the problem was.

Cheers.


这篇关于主/详细数据网格视图未加载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆