Change Option for Combo Box Dynamically

Use this board to ask questions or have discussions with other Genie users.
Post Reply
benson_seb
New User
Posts: 4
Joined: Wed Jan 08, 2020 6:08 am
First Name: Benson
Last Name: Sebastian
Company Name: AdvantEdge
Contact:

Change Option for Combo Box Dynamically

Post by benson_seb »

How do I change format of displaying options in combo box .
I want to display options like
Value1=Option1,
value2=Option2

Thanks
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Change Option for Combo Box Dynamically

Post by Scott Klement »

Hello Benson,

Can you explain a little bit more about where the data is coming from? Are you loading values from a database file? Or are you coding them yourself in the properties? Or, how does it work?
benson_seb
New User
Posts: 4
Joined: Wed Jan 08, 2020 6:08 am
First Name: Benson
Last Name: Sebastian
Company Name: AdvantEdge
Contact:

Re: Change Option for Combo Box Dynamically

Post by benson_seb »

by default combo box is loaded with values from properties (choice and choice values).
Example: Currently Choice will be like Add, Edit, Delete and Choice Values will be 1,2,3
I need Choice :1=Add,2=Edit,3=Delete and Choice Values 1,2,3

I want this format for all combo boxes in the subfile.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Change Option for Combo Box Dynamically

Post by Scott Klement »

So set the choices to 1=Add,2=Edit,3=Delete
benson_seb
New User
Posts: 4
Joined: Wed Jan 08, 2020 6:08 am
First Name: Benson
Last Name: Sebastian
Company Name: AdvantEdge
Contact:

Re: Change Option for Combo Box Dynamically

Post by benson_seb »

Some cases the option will be disabled .if i set the option manually it will display options always.so i need to be done dynamically. is there any way i can access the choice and choice values and set it in events onoptiondisplay
benson_seb
New User
Posts: 4
Joined: Wed Jan 08, 2020 6:08 am
First Name: Benson
Last Name: Sebastian
Company Name: AdvantEdge
Contact:

Re: Change Option for Combo Box Dynamically

Post by benson_seb »

for combowidget we get choices and values, two parameters in onoptiondisplay event,
using that parameters
i updated choices=values+"="+choices in the loop of i and i got the result.

In the description of onoptiondisplay event its mention parameter name as options, but its not working for me.
I used choices and it worked.

can i add addeventlistener in js file ,so that i do not required to change in every comboboxwidget?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests