标签:des style ext color c int
DataWindow值获取
例1:读取第一行第二个字段单元格的数值
dw_1.object.DATA[1,2]
例2:读取name字段第二行数值
dw_1.object.name[2]
例3:获取name字段所有数据(列)
string stu_name[]
stu_name[]=dw_1.object.name.CURRENT
例4:获取当前第几行
long rowNum
rowNum=dw_1.GetRow()
例5:获取当前第几列
long columnNum
columnNum=dw_1.GetColumn()
例6:获取总共行数
dw_1.rowCount()
例7:获取总共列数
li_colnum = Integer(dw_1.object.datawindow.column.count) 或
ll_column = long(dw_1.Describe("DataWindow.Column.Count"))
例8:获取所有列标题
ll_colnum = Long(dw_1.object.datawindow.column.count)
FOR i = 1 TO ll_colnum
ls_colname = dw_1.describe(‘#‘ + string(i) +
".name") + "_t"
messagebox("",ls_colname)
next
例9:取得单击的列标题、列名、数据库字段名
string ls_dwo
string ls_title
string ls_column
string ls_dbname
ls_dwo = dwo.Name //无须修改
ls_title = This.describe(ls_dwo + ‘_t.text‘)//标题
ls_column = This.describe(ls_dwo + ‘.Name‘) //数据窗口列名
ls_dbname = This.describe(ls_dwo + ‘.dbname‘) //数据库中字段名
DataWindow值获取,搜素材,soscw.com
DataWindow值获取
标签:des style ext color c int
原文地址:http://www.cnblogs.com/lishk/p/3720090.html