我有一个表格,主表(第一级表格)可以进行任意操作,第二级表格通过主表的MasterRowExpanded事件获取第二级表格对象进行表格操控,代码如下:
[Visual Basic .NET] 纯文本查看 复制代码 Private Sub gvProduct_MasterRowExpanded(ByVal sender As System.Object, ByVal e As DevExpress.XtraGrid.Views.Grid.CustomMasterRowEventArgs) Handles gvProduct.MasterRowExpanded
Dim gv As DevExpress.XtraGrid.Views.Grid.GridView = CType(gvProduct.GetDetailView(e.RowHandle, e.RelationIndex), DevExpress.XtraGrid.Views.Grid.GridView)
If gv IsNot Nothing Then
gv.Columns(1).Caption = "编号"
gv.Columns(2).Caption = "名称"
gv.Columns(0).Visible = False
gv.Columns(3).Visible = False
gv.Columns(4).Visible = False
End If
GeneralFunction.SetGridViewAppearance(gv)
AddHandler gv.CustomDrawRowIndicator, AddressOf GridView_CustomDrawRowIndicator
End Sub
到了第三级表格就没有办法了,请问有没有什么办法可以获取第三级或第四级的表格对象,进行操控。
|