你好!
窗口打开后目录树可实现筛选,单击分页按钮后再筛选就报错--- 此行已从表中移除并且没有任何数据。BeginEdit() 将允许在此行中创建新数据
With DataTables("表A")
.LoadFilter = ""
.LoadPage = 0
.LoadTop = 8
.Load()
e.Form.Controls("TextBox1").Value = 1 & "/" & .TotalPages
End With
Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
trv.BuildTree("表A", "第一列")
trv.Nodes.Insert("显示所有行",0)
trv.ExpandAll
Dim dr As DataRow = e.Node.DataRow
If e.Node.Text <> "显示所有行" Then
Select Case e.Node.Level
Case 0
Tables("窗口1_Table1").Filter = "[第一列] = '" & dr("第一列") & "'"
Tables("窗口2_Table2").Filter = "[第一列] = '" & dr("第一列") & "'"
End Select
End If