Friday, December 11, 2009

Get the display value of DropownDatawindow

如題。

PowerBuilder 裡有一個相當方便的東西就是dropdowndatawindow(dddw)。要取到他的值(data value)很容易,但是要抓到顯示的值(display value)倒是第一次。

displayValue = dw_1.Describe("Evaluate('LookUpDisplay(column_name) ', row#))

一行搞定XD 不過裡面用了很多東西= =。


LookUpDisplay
DescriptionObtains the display value in the code table associated with the data value in the
specified column.
SyntaxLookUpDisplay(column)
Return ValueString. Returns the display value when it succeeds and the empty string (“”) if
an error occurs.


Evaluating DataWindow expressions in the Describe function
DescriptionThe Describe function provides a way to evaluate DataWindow expressions outside their usual context.
Syntaxdwcontrol.Describe ("Evaluate ( 'expression' , rownumber ) " )


Comments

0 Responses to "Get the display value of DropownDatawindow"

Post a Comment

Tags