以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  删除所有未保存行  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=84170)

--  作者:联友
--  发布时间:2016/4/25 9:36:00
--  删除所有未保存行

在窗口AfterClose 删除所有未保存行,求代码,谢谢!

If Tables("车辆信息").Current.DataRow.RowState= DataRowState.Added Then
???
End If

[此贴子已经被作者于2016/4/25 9:36:50编辑过]

--  作者:大红袍
--  发布时间:2016/4/25 9:45:00
--  
Dim t As Table = Tables("车辆信息")
For i As Integer = t.rows.count-1 To 0 Step -1
    If t.rows(i).DataRow.RowState = DataRowState.Added Then
        t.rows(i).delete
    End If
Next

--  作者:联友
--  发布时间:2016/4/25 9:59:00
--  
谢谢!