Foxtable(狐表)用户栏目专家坐堂 → 请问这个命令如何修改


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

主题:请问这个命令如何修改

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


加好友 发短信
等级:幼狐 帖子:147 积分:1863 威望:0 精华:0 注册:2020/1/23 16:11:00
请问这个命令如何修改  发帖心情 Post By:2021/6/4 7:08:00 [显示全部帖子]

请问这个命令如何只适用筛选之后的表? 


Dim drs1 As List(Of DataRow) = DataTables("六年级").Select("paixu % 2 = 0","成绩 desc")
Dim drs2 As List(Of DataRow) = DataTables("六年级").Select("paixu % 2 = 1","成绩 desc")
Dim cnt As Integer = math.min(drs1.count,drs2.count)
Dim idx As Integer = 1
For i As Integer = 0 To cnt - 1
drs1(i)("排xu") = idx
idx += 1
drs2(i)("排xu") = idx
idx += 1
Next

If drs1.count > cnt Then
For i As Integer = cnt To drs1.count - 1
drs1(i)("排xu") = idx
idx += 1
Next
Else
For i As Integer = cnt To drs2.count - 1
drs2(i)("排xu") = idx
idx += 1
Next
End If

Tables("六年级").sort = "排xu"

 回到顶部