以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  tables如何限制行数?  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=33136)

--  作者:晕了快扶我
--  发布时间:2013/5/14 15:58:00
--  tables如何限制行数?
比如只能5行,如何限制?
--  作者:XYT
--  发布时间:2013/5/14 16:00:00
--  
判断当前行数,超过5就不能增加
--  作者:Bin
--  发布时间:2013/5/14 16:01:00
--  
在表的BeforeAddDataRow 事件中

统计一下行数
if e.datatable.datarows.COunt>=5 then
e.Cancel=true
end if

--  作者:晕了快扶我
--  发布时间:2013/5/14 16:11:00
--  
TKS!