string colname,coltype
int col,colcount
long currow,rowcount
SetPointer(HourGlass!)
rowcount=dw.RowCount()
currow=dw.GetRow()
dw.AcceptText()
colcount=Integer(dw.Describe("datawindow.column.count"))
for currow=1 to rowcount
if dw.getitemstatus(currow,0,Primary! )=notmodified! then continue//
for col=1 to colcount
if dw.Describe("#"+string(col)+".key")="yes" then
coltype = dw.Describe("#"+string(col)+".ColType")
if left(coltype,4)="char" or left(coltype,4)="varc"then
if IsNull(dw.GetItemString(currow,col)) then
dw.ScrollToRow(currow)
dw.SetColumn(col)
dw.SetFocus()
colname=dw.Describe("#"+string(col)+".name")
//save_sign=FALSE
return "第"+string(currow)+"个记录 "+dw.Describe(colname+"_t.text") + " 没有数据!~r~n"
end if
end if //for string type
if left(coltype,7)="decimal" then
if IsNull(dw.GetItemDecimal(currow,col)) then
dw.ScrollToRow(currow)
dw.SetColumn(col)
dw.SetFocus()
colname=dw.Describe("#"+string(col)+".name")
//save_sign=FALSE
return "第"+string(currow)+"个记录 "+dw.Describe(colname+"_t.text") + " 没有数据!~r~n"
end if
end if //for decimal type
if coltype="date" then
if IsNull(dw.GetItemDate(currow,col)) then
dw.ScrollToRow(currow)
dw.SetColumn(col)
dw.SetFocus()
colname=dw.Describe("#"+string(col)+".name")
//save_sign=FALSE
return "第"+string(currow)+"个记录 "+dw.Describe(colname+"_t.text") + " 没有数据!~r~n"
end if
end if //for date type
if coltype="datetime" then
if IsNull(dw.GetItemDateTime(currow,col)) then
dw.ScrollToRow(currow)
dw.SetColumn(col)
dw.SetFocus()
colname=dw.Describe("#"+string(col)+".name")
//save_sign=FALSE
return "第"+string(currow)+"个记录 "+dw.Describe(colname+"_t.text") + " 没有数据!~r~n"
end if
end if //for datetime type
if coltype="number" then
if IsNull(dw.GetItemNumber(currow,col)) then
dw.ScrollToRow(currow)
dw.SetColumn(col)
dw.SetFocus()
colname=dw.Describe("#"+string(col)+".name")
//save_sign=FALSE
return "第"+string(currow)+"个记录 "+dw.Describe(colname+"_t.text") + " 没有数据!~r~n"
end if
end if //for number type
if coltype="time" then
if IsNull(dw.GetItemTime(currow,col)) then
dw.ScrollToRow(currow)
dw.SetColumn(col)
dw.SetFocus()
colname=dw.Describe("#"+string(col)+".name")
//save_sign=FALSE
return "第"+string(currow)+"个记录 "+dw.Describe(colname+"_t.text") + " 没有数据!~r~n"
end if
end if //for time type
if coltype="timestamp" then
if IsNull(dw.GetItemTime(currow,col)) then
dw.ScrollToRow(currow)
dw.SetColumn(col)
dw.SetFocus()
colname=dw.Describe("#"+string(col)+".name")
//save_sign=FALSE
return "第"+string(currow)+"个记录 "+dw.Describe(colname+"_t.text") + " 没有数据!~r~n"
end if
end if //for timestamp type
if coltype="int" or coltype="long" then
if IsNull(dw.GetItemnumber(currow,col)) then
dw.ScrollToRow(currow)
dw.SetColumn(col)
dw.SetFocus()
colname=dw.Describe("#"+string(col)+".name")
//save_sign=FALSE
return "第"+string(currow)+"个记录 "+dw.Describe(colname+"_t.text") + " 没有数据!~r~n"
end if
end if //for int
end if
next // for col
next // for row
return "ok"
if d_atawindow.Accepttext() = -1 then
d_atawindow.setfocus()
return False
end if
if d_atawindow.findrequired(primary!,lrow,ncolumn,szcolumn,true) < 0 then
return false
end if
if lrow <> 0 then
szcolumn = d_atawindow.describe(szcolumn + "_t.Text")
d_atawindow.setredraw(false)
d_atawindow.setcolumn(nColumn)
d_atawindow.scrolltorow(lrow)
d_atawindow.setredraw(true)
d_atawindow.setfocus()
return false
end if