以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- DataColChanged编写了一串代码,可是每次都是需要重置列才能生效,怎么办? (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=98912) |
-- 作者:rubonlau -- 发布时间:2017/4/9 10:10:00 -- DataColChanged编写了一串代码,可是每次都是需要重置列才能生效,怎么办? 如图。有一个积分列的代码是这样的。 Select Case e.DataRow("所属阵营") Case "好人阵营" If e.DataRow("游戏结果") = "胜利" Then e.DataRow("积分")=2 Else e.DataRow("积分")=-1 End If Case "狼人阵营" If e.DataRow("游戏结果") = "胜利" Then e.DataRow("积分")=3 Else e.DataRow("积分")=0 End If End Select 这段代码写在DataColChanged中。 可是每次打开表格的时候都需要重置列才能让积分列有数据。
|
-- 作者:有点色 -- 发布时间:2017/4/9 11:41:00 -- 你的积分列是表达式列?
http://www.foxtable.com/webhelp/scr/1380.htm
|