各位:比如说从数据库里retrieve数据窗口某一列某一行取出是5,第一次改3,第二次改成4,第三次改成6,这时我要获取原始值5与当前值6。有没有在ACCEPT之后,直接获取原始值5的函数?dw_1.GetItemNumber(row,"colums",Primary!,true)试了不行,true和false获取出来的值是一样的,都是当前值。
------解决方案--------------------
accept之后就只能从数据库取了
------解决方案--------------------
谁说的。试试这个
dwcontrol.Object.Data {.buffer } {.datasource } [ rownum, colnum ]
Parameter Description
dwcontrol The name of the DataWindow control or child DataWindow in which you want to get or set data.
buffer
(optional) The name of the buffer from which you want to get or set data. Values are:?Primary - (Default) The data in the primary buffer (the data that has not been deleted or filtered out).?Delete - The data in the delete buffer (data deleted from the DataWindow control).?Filter - The data in the filter buffer (data that was filtered out).
datasource
(optional) The source of the data. Values are:?Current - (Default) The current values in the DataWindow control.?Original - The values that were initially retrieved from the database.
rownum The row number of the desired item.
colnum The column number of the desired item.The row and column numbers must be enclosed in brackets and separated by commas.
------解决方案--------------------
dwcontrol.Object.Data {.buffer } {.datasource } [ rownum, colnum ] 和 getitemnumber效果是一样的,accepttext后提取不到原始数据;新建datawindow或者datastore试一下吧。
------解决方案--------------------
dw.Objec.colums.Original[ROW] - 得到从数据库中检索出来的值
dw.Objec.colums[ROW] - 得到当前值