数据表是SQL视图,第一页可以加载,加载代码如下
Dim filter As String = ""
Dim yz As WinForm.TextBox = e.Form.Controls("页")
Dim jl As WinForm.Label = e.Form.Controls("本页记录数")
Select Case e.Node.Level
Case 0
filter = "版本 = '" & e.Node.Text & "'"
Case 1
filter = "版本 = '" & e.Node.ParentNode.Text & "' and BOM系列 = '" & e.Node.Text & "'"
End Select
With DataTables("产品BOM一览表")
.LoadFilter = filter '一定要清除加载条件
.LoadTop = 30
.LoadPage = 0
.LoadOver = "BOM系列"
.Load()
yz.Value = 1 & "/" & .TotalPages
End With
With Tables("产品BOM一览表")
.MergeMode = MergeModeEnum.Free
.MergeCols.Clear()
.MergeCols.Add("产品名称")
.MergeSort = ""
.AllowMerge = True
.ExtendLastCol = True
.AutoSizeRows()
jl.Text = "本页有" & .Rows.Count & "条记录"
End With
下一页加载不出来数据,加载代码如下
Dim jl As WinForm.Label = e.Form.Controls("本页记录数")
Dim yz As WinForm.TextBox = e.Form.Controls("页")
With DataTables("产品BOM一览表")
If .LoadPage < .TotalPages - 1 Then
.LoadPage = .LoadPage + 1
.LoadOver = "BOM系列"
.Load()
yz.Value = .LoadPage + 1 & "/" & .TotalPages
End If
End With
With Tables("产品BOM一览表")
.MergeMode = MergeModeEnum.Free
.MergeCols.Clear()
.MergeCols.Add("产品名称")
.MergeSort = ""
.AllowMerge = True
.ExtendLastCol = True
.AutoSizeRows()
jl.Text = "本页有" & .Rows.Count & "条记录"
End With
请教下一页这里是怎么会事哪?
此主题相关图片如下:qq图片20160920085318.png