以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  不加载外部数据的空表新增第一行提示运行错误  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=71287)

--  作者:foxstudent
--  发布时间:2015/7/8 16:56:00
--  不加载外部数据的空表新增第一行提示运行错误
一个表,使用外部数据源,设置外部数据表过滤条件[_Identify] Is Null 不加载任何数据,在空表中点增加行,就出现运行错误:
.NET Framework 版本:2.0.50727.3655
Foxtable 版本:2014.11.11.1
错误所在事件:表,lsyc,DataRowAdding
详细错误信息:
Exception has been thrown by the target of an invocation.
Index -1 is either negative or above rows count.

但关闭这个对话框后,新增的空白行显示了,再增加就正常了,这应怎么处理?

--  作者:大红袍
--  发布时间:2015/7/8 17:09:00
--  
 贴出 DataRowAdding 代码
--  作者:foxstudent
--  发布时间:2015/7/8 19:21:00
--  
以下是引用大红袍在2015/7/8 17:09:00的发言:
 贴出 DataRowAdding 代码
找到原因了,原来我在 DataRowAdding 设置了新增行的日期默认上一行,现在设置了不加载数据,自然没法找到上一行数据了,自己忘记了。