以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 隐藏行代码,报错,需如何修改? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=192008) |
-- 作者:9EQ98 -- 发布时间:2024/5/23 14:03:00 -- 隐藏行代码,报错,需如何修改? 隐藏行代码,报错,需如何修改? Dim 表控件 As WinForm.Table = e.Form.Controls("合同进度") Dim 操作表 As Table = 表控件.Table For i As Integer = 1 To 操作表.grid.Rows.count - 1 If 操作表.grid.Rows(i)("生产单位") = "所有" AndAlso 操作表.grid.Rows(i)("CMID") = "所有" Then 操作表.grid.Rows(i).visible = e.Sender.Checked End If Next [此贴子已经被作者于2024/5/24 19:43:20编辑过]
|
-- 作者:y2287958 -- 发布时间:2024/5/23 14:06:00 -- 要确保当前表有记录 |
-- 作者:有点蓝 -- 发布时间:2024/5/23 14:06:00 -- For i As Integer = 1 To 操作表.grid.Rows.count - 1 If 操作表.grid.Rows(i)("生产单位") <> System.DBNull.Value Then If 操作表.grid.Rows(i)("生产单位") = "所有" AndAlso 操作表.grid.Rows(i)("CMID") = "所有" Then 操作表.grid.Rows(i).visible = e.Sender.Checked End If End If Next
|
-- 作者:9EQ98 -- 发布时间:2024/5/24 19:43:00 -- Dim 表控件 As WinForm.Table = e.Form.Controls("合同进度") Dim 操作表 As Table = 表控件.Table If 操作表.grid.Rows.count <= 0 Then Return End If For i As Integer = 0 To 操作表.grid.Rows.count - 1 If 操作表.grid.Rows(i)("生产单位") <> System.DBNull.Value Then If 操作表.grid.Rows(i)("生产单位") = "所有" AndAlso 操作表.grid.Rows(i)("CMID") = "所有" Then 操作表.grid.Rows(i).visible = e.Sender.Checked End If End if Next [此贴子已经被作者于2024/5/24 19:43:40编辑过]
|
-- 作者:有点蓝 -- 发布时间:2024/5/25 9:16:00 -- For i As Integer = 0 To 操作表.grid.Rows.count - 1 If 操作表.grid.Rows(i)("生产单位") isnot System.DBNull.Value Then If 操作表.grid.Rows(i)("生产单位") = "所有" AndAlso 操作表.grid.Rows(i)("CMID") = "所有" Then 或者 For i As Integer = 0 To 操作表.grid.Rows.count - 1 If 操作表.grid.Rows(i)("生产单位").ToString = "所有" AndAlso 操作表.grid.Rows(i)("CMID").ToString = "所有" Then 操作表.grid.Rows(i).visible = e.Sender.Checked End If Next |