网格控件中的两个网格视图 - 无法获取内部网格的聚焦行句柄
在 Visual Studio 2008 中使用 DevExpress 10.2 和 VB.Net 我创建了一个包含两个不同网格视图的网格控件。 gridviews 使用 id
列进行关联。基本上,如果第一个网格视图中存在有关行的相关详细信息,那么用户可以单击加号来查看所有相关详细信息。当我在第一个网格视图上有任何行时,我可以获得焦点行。然而,当我将焦点放在第二个 gridview 中的任何行时,我无法获取焦点行或行的内容。
gridview2.focusedRowHandle = -2147...
gridview2.getRowCellValue(gridview2.FocusedRowHandle, "id") = Nothing
gridview2.GetFocusedRowCellValue("id") = Nothing
有没有办法从聚焦的内部 gridview 获取 id 中的值?或者至少找出父行并从那里获取 id 值?
Using DevExpress 10.2 within Visual Studio 2008 with VB.Net I have created a single gridcontrol that contains two different gridviews. The gridviews are related using an id
column. Basically if there are related details about a row in the first gridview then the user can click on the plus sign to see all the related details. When I have any row on the first gridview I am able to get the focused row. Yet when I have the focus on any of the rows in the second gridview I am unable to get the focused row or the content of the row.
gridview2.focusedRowHandle = -2147...
gridview2.getRowCellValue(gridview2.FocusedRowHandle, "id") = Nothing
gridview2.GetFocusedRowCellValue("id") = Nothing
Is there any way to get the value in id
from the focused inner gridview? Or at least figure out the parent row and grab the id
value from there?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您使用的代码是错误的,因为 DetailView 是单独的对象,是分配给某个级别的详细 GridView 对象的克隆。因此,要使代码正常工作,您应该使用
有关更多详细信息,请参阅 什么会导致详细网格视图的属性、方法和事件失败?
The code you are using is wrong because the DetailViews are separate objects, CLONEs of the detail GridView object assigned to a level. So, to make the code work, you should use
For more details, please refer to the What can cause the properties, methods, and events of a detail grid view to fail?