PowerBuilder 裡有一個相當方便的東西就是dropdowndatawindow(dddw)。要取到他的值(data value)很容易,但是要抓到顯示的值(display value)倒是第一次。
displayValue = dw_1.Describe("Evaluate('LookUpDisplay(column_name) ', row#))
一行搞定XD 不過裡面用了很多東西= =。
LookUpDisplay | |
Description | Obtains the display value in the code table associated with the data value in the specified column. |
Syntax | LookUpDisplay(column) |
Return Value | String. Returns the display value when it succeeds and the empty string (“”) if an error occurs. |
Evaluating DataWindow expressions in the Describe function | |
Description | The Describe function provides a way to evaluate DataWindow expressions outside their usual context. |
Syntax | dwcontrol.Describe ("Evaluate ( 'expression' , rownumber ) " ) |
Post a Comment