Foxtable(狐表)用户栏目专家坐堂 → [求助]收支


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

主题:[求助]收支

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/8/15 15:32:00 [显示全部帖子]

If e.DataRow.isnull(e.DataCol.name)=False Then
    If e.DataCol.name.StartsWith("支出") Then
        e.DataRow("方向")=true
    Else If e.DataCol.name.StartsWith("收入") Then
        e.DataRow("方向")=true
    End If
End If

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/8/15 17:32:00 [显示全部帖子]

 需要编写prepareEdit事件,代码如下

 

If e.Col.name.StartsWith("支出") Then
    For Each c As Col In e.Table.Cols
        If c.name.Startswith("收入") AndAlso e.Row.IsNull(c.Name) = False Then
            e.cancel = True
            Exit For
        End If
    Next
Else If e.Col.name.StartsWith("收入") Then
    For Each c As Col In e.Table.Cols
        If c.name.Startswith("支出") AndAlso e.Row.IsNull(c.Name) = False Then
            e.cancel = True
            Exit For
        End If
    Next
End If


 回到顶部