Foxtable(狐表)用户栏目专家坐堂 → 如何用按钮删除表中 未保存的行


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

主题:如何用按钮删除表中 未保存的行

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


加好友 发短信
等级:六尾狐 帖子:1418 积分:7167 威望:0 精华:0 注册:2013/3/18 8:37:00
  发帖心情 Post By:2013/4/20 14:07:00 [显示全部帖子]

For Each dr As DataRow In dt.DataRows
            If dr.RowState=DataRowstate.added Then
                dr.delete
            End If
        Next
    Else '否则退出
        MessageBox.Show("请点击保存按钮保存","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
        Return
       
    End If
End If

 回到顶部