Foxtable(狐表)用户栏目专家坐堂 → 统计排序


  共有5065人关注过本帖树形打印复制链接

主题:统计排序

帅哥哟,离线,有人找我吗?
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:113660 积分:578843 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/3/6 17:44:00 [显示全部帖子]

……

e.form.controls("Table11").Table.AutoSizeCols(3)
t.DefaultRowHeight = 31

t.DataTable.DataCols.Add("_sortkey", Gettype(Decimal))

t.Sort = "序列号,排产日期"

For Each r As Row In t.Rows
    r("_sortkey") = r.Index
Next
t.rows(t.rows.count - 1).Move(0)
t.Sort = "_sortkey"
t.DataTable.AcceptChanges
t.ResumeRedraw


 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:113660 积分:578843 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/3/6 20:25:00 [显示全部帖子]

……

e.form.controls("Table11").Table.AutoSizeCols(3)
t.DefaultRowHeight = 31

t.DataTable.DataCols.Add("_sortkey", Gettype(Decimal))

t.rows(t.rows.count - 1).Move(0)

t.rows(0)("_sortkey") = 0

dim i as integer = 1

For Each dr As dataRow In t.DataTable.select("_sortkey is null","序列号,排产日期")

    dr("_sortkey") = i

i+=1
Next

t.Sort = "_sortkey"
t.DataTable.AcceptChanges
t.ResumeRedraw

[此贴子已经被作者于2020/3/6 20:31:56编辑过]

 回到顶部