Dim st As Date = Date.Now
Tables("测试_Table1").DataTable.StopRedraw
With Tables("测试_Table1").DataTable
.LoadFilter = ""
.LoadTop = 20
.LoadPage = 0
Tables("测试_table1").Fill("Select 简称,交易币种,结款条件,税率,简介,联系人,职务,{供应商联络人}.电话 As [联系方式] From {供应商资料表} Inner JOIN {供应商联络人} ON {供应商联络人}.[代码] = {供应商资料表}.[代码]","ERP",True)
.Load()
End With
With Tables("测试_table1")
.MergeMode = MergeModeEnum.Free
.MergeCols.Clear()
.MergeCols.Add("简称")
.MergeCols.Add("联系方式")
.MergeCols.Add("结款条件")
.MergeSort = "简称,联系方式,结款条件"
.AllowMerge = True
.DataTable.SysStyles("EmptyArea").BackColor = color.Transparent
End With
Tables("测试_Table1").DataTable.ResumeRedraw
MessageBox.Show("耗时: " & (Date.Now - st).TotalSeconds & "秒")
测试15行数据要接近7秒
我怀疑是我全部加载后再分页的,有没有办法用Fill的办法分页加载呢?