Hi, Reynard -
To obtain the data value, obtain it via the GetItemString function. For example:
Long ll_row
String ls_data
ll_row = dw_1.GetRow()
If ll_row < 1 or ll_row > dw_1.RowCount() Then
MessageBox("Error","Select a row first, please.")
Return 0
End If
ls_data = dw_1.GetItemString(ll_row,"charge_type_codes")
MessageBox('Data Value','The data value in row '+String(ll_row)+' is "'+ls_data+'".')
Return 0
To obtain the display value of the selected option from the drop-down list box, Use the Evaluate expression in a Describe function:
Long ll_row
String ls_describe, ls_display
ll_row = dw_1.GetRow()
If ll_row < 1 or ll_row > dw_1.RowCount() Then
MessageBox("Error","Select a row first, please.")
Return 0
End If
ls_describe = "Evaluate('LookUpDisplay(charge_type_codes)'," + String(ll_row) + ")"
ls_display = dw_1.Describe(ls_describe)
MessageBox('Display Value','The display value in row '+String(ll_row)+' is "'+ls_display+'".')
Return 0
Best regards, John
dw_control.Object.columnname.Values
The format of the string is the same as the datawindow source:
displayvalue1 tab datavalue1 forwardslash displayvalue2 tab datavalue2 forwardslash displayvalue3 tab datavalue forwardslash3