AfterLoad事件的最后面,加上一行代码,就可以移动行了:
Dim dtb As New DataTableBuilder("统计")
dtb.AddDef("_Sortkey", Gettype(Double))
dtb.AddDef("产品", Gettype(String), 32)
dtb.AddDef("客户", Gettype(String), 32)
dtb.AddDef("数量", Gettype(Integer))
dtb.AddDef("金额", Gettype(Double))
dtb.AddDef("测试", Gettype(Double),"[_SortKey]")
e.Form.Controls("Table1").Table.datasource = dtb.BuildDataSource
e.Form.Controls("Table1").Table.allowedit = True
e.Form.Controls("Table1").Table.Sort = ""