转自: http://www.lsrxc.com/archives/575.html 异萝松的技术博客
PB快速获取DW整列值,废话不多说,马上上代码!
[code lang=”JS”]
//Powered By www.lsrxc.com
public function long of_getcolvalue (datawindow adw_source, string as_colname, long al_startrow, long al_endrow, ref any aa_return[])
string ls_type
any la_return[]
dwobject ldwo_column
aa_return[] = la_return[]
if al_startrow < 1 then return II_FAILURE
if al_startrow > al_endrow then return II_FAILURE
if al_endrow > adw_source.rowcount() then return II_FAILURE
ls_type = adw_source.describe(as_colname + ".type")
if ls_type <> "column" then return II_FAILURE
ldwo_column = adw_source.object.__get_attribute(as_colname, false)
aa_return[] = ldwo_column.primary[al_startrow, al_endrow]
return upperbound(aa_return[])
[/code]
[code lang=”JS”]
//Powered By www.lsrxc.com
public function long of_getcolvalue (datawindow adw_source, string as_colname, ref any aa_return[])
return this.of_getcolvalue(adw_source, as_colname, 1, adw_source.rowcount(), ref aa_return[])
[/code]