Insert row DataWindow but dropdownlist doesn't show
I beg your solution to my script in PowerBuilder. I think it's fine but doesn't work properly. Here's the script:
long ll_newrow
ll_newrow = dw_2.InsertRow(0)
dw_2.object.rectype[ll_newrow] = 'I'
dw_2.object.procyear[ll_newrow] = off_procyear
dw_2.ob开发者_高级运维ject.procmth[ll_newrow] = off_procmth
dw_2.object.batchno[ll_newrow] = off_batchno
dw_2.object.pibseqno[ll_newrow] = pib_max
//dw_2.object.modifydate[ll_newrow] = id_modifydate
//dw_2.object.modifier[ll_newrow] = 'I-' + TRIM(is_modifier)
dw_2.ScrollToRow(ll_newrow)
dw_2.setcolumn("pibseqno")
dw_2.SetFocus()
Data in dropdown list that I've made in DataWindow doesn't show in run time, but it's fine in development.
You'll probably want to do a GetChild on the column in question, SetTransObject() on the DataWindowChild, then Retrieve() on the DataWindowChild. There are many ways to populate a DropDownDataWindow (I'm assuming it's a DDDW that you're asking about), but this is the most common, other than maybe AutoRetrieve which AFAIK isn't applicable when you only do an InsertRow().
Good luck,
Terry.
精彩评论