Foxtable(狐表)用户栏目专家坐堂 → [求助]行列批量显示隐藏操作


  共有2881人关注过本帖平板打印复制链接

主题:[求助]行列批量显示隐藏操作

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


加好友 发短信
等级:四尾狐 帖子:812 积分:6676 威望:0 精华:0 注册:2014/11/26 12:32:00
[求助]行列批量显示隐藏操作  发帖心情 Post By:2019/4/26 10:43:00 [只看该作者]

 1、下面是批量删除选择行的代码怎样修改成,批量隐藏行呢?  同时反向全部取消隐藏行,代码怎样呢?
With Tables("表A")
    For i As Integer = .BottomPosition To .TopPosition Step -1
        .Rows(i).Delete()
    Next
End With

Remove,会不会删除数据?
With Tables("表A")
    For i As Integer = .BottomPosition To .TopPosition Step -1
        .Rows(i).Remove()
    Next
End With

反向全部取消隐藏行,下面代码无效,怎么修改呢?
Dim t As Table = Tables("表A")
t.HideSelectedRows
'msgbox(t.filter)
t.filter = ""

2、空值列批量隐藏:
For Each c As Col In Tables("表A").Cols
    Dim fdr As DataRow = c.Table.DataTable.Find(c.name & " is not null")
    If fdr IsNot Nothing Then
        c.Visible = True
    Else
        c.Visible = False
    End If
Next

求助:取消窗口表中空值列的隐藏 ,下面代码无效,怎么修改?
'窗口表中空值列的隐藏
With Tables("表A")
    For Each c1 As Col In .Cols
        c1.Visible = True
    Next
    For Each c2 As Col In .Cols
        Dim p As Integer = .FindRow(c2.Name & " Is Not Null")
        If P = -1 Then
            c2.Visible = False
        End If
    Next
End With
[此贴子已经被作者于2019/4/26 11:14:03编辑过]

 回到顶部