以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 刷新行出错 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=124701) |
-- 作者:lur320 -- 发布时间:2018/9/12 10:01:00 -- 刷新行出错 在datacol changed事件里面: For Each dr As DataRow In DataTables("inputItem").SQLSalect(......) If dr("quantity") > reportout Then ..... dr.save Else ..... dr.save End If Dim ids As String ids=dr("_identify") DataTables("inputItem").RemoveFor("_identify=\'" & ids & "\'") DataTables("inputItem").AppendLoad("_identify=\'" & ids & "\'") Next 为何这段代码在所有行刷新完毕后会出错? This row has been removed from a table and does not have any data. BeginEdit() will allow creation of new data in this row.
|
-- 作者:lur320 -- 发布时间:2018/9/12 10:02:00 -- 并且,目前我还没有设定datatable 的sqlloadfilter。所有行都已经加载到表里面。 |
-- 作者:有点甜 -- 发布时间:2018/9/12 10:44:00 -- datacolchanged尽量不要刷新行等操作,datacolchanged事件有可能重复触发多次的,如果你刷新了行,会导致第二次进来的时候找不到行报错。
或者你试试加上systemready http://www.foxtable.com/webhelp/scr/2218.htm
或者上传实例测试。 |