以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  连续增加空行  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=58351)

--  作者:newsun2k
--  发布时间:2014/10/15 16:01:00
--  连续增加空行
请问,如何阻止用户通过插入行的按钮,连续插入空行?只让他最多插入一个空行。
保存的时候如何自动删除空行?

--  作者:有点甜
--  发布时间:2014/10/15 16:11:00
--  
Dim str As String = "1=1"
For Each dr As DataCol In DataTables("表A").DataCols
    str &= " and " & dr.Name & " Is null"
Next
Dim fdr As DataRow = DataTables("表A").Find(str)
If fdr IsNot Nothing Then
    msgbox("有空行")
End If

--  作者:Bin
--  发布时间:2014/10/15 16:11:00
--  
1.BeforeAddDataRow判断当前行所有列都是空就取消增加行

2.在BeforeSaveDataRow判断如果所有列是空就取消保存,并且删除行.