Link to home
Start Free TrialLog in
Avatar of taniatangri
taniatangri

asked on

How to Add item to Dropdownlistbox dynamically?

I have a datawindow(dw_coll_excsel) which has a dropdownlistbox(select_exc_flag). The values of this dropdownlistbox are hardcoded. But on a certain condition, i want to add an item to this dropdownlistbox from the open event of the window. This is what I have given, but i am getting an error. The type of select_exc_flag is Number, but it has display values as strings. How do I incorporate that here.
I want to insert the 17th row with data value as "Acct is coded to rep 96"

This is what I have done:
dw_coll_excsel.InsertRow(0)
string s
int row
s = "Acct is coded to rep 96"
IF A = "SUPPLY" THEN
row=dw_coll_excsel.object.select_exc_flag[1].AddItem(17)
END IF
ASKER CERTIFIED SOLUTION
Avatar of michaelstoffel
michaelstoffel

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of taniatangri
taniatangri

ASKER

Thanks a lot! Your solution solved my problem.