Foxtable(狐表)用户栏目专家坐堂 → 自动删除行


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

主题:自动删除行

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


加好友 发短信
等级:四尾狐 帖子:832 积分:5867 威望:0 精华:6 注册:2011/5/27 11:41:00
功能咨询  发帖心情 Post By:2012/1/8 20:47:00 [显示全部帖子]

楼主:需要在表B 中加入一列"id"

If e.DataCol.Name = "逻辑列名" Then
    If e.DataRow("逻辑列名") = True Then
        Dim dr As DataRow = DataTables("表B").AddNew
        For Each dc As DataCol In DataTables("表B").DataCols
            If dc.name ="id" Then
                dr("id") =e.DataRow("_identify")
            Else
                dr(dc.Name) = e.DataRow(dc.Name)
            End If
        Next
    Else
        Dim tr As DataRow =DataTables("表B").find("id ="& e.DataRow("_identify"))
        If tr IsNot Nothing Then
            tr.delete()
        End If
    End If
End If


 回到顶部