cancel
Showing results for 
Search instead for 
Did you mean: 

Populating drop-down list dynamically

Former Member
0 Kudos

Hi,

I am trying to populate the dropdown lists dynamically.

Created Node Attribute and Simple Type with no enumeration. Assigned the Simple Type to Node Attribute. Mapped Node Attribute to UI element. Used following code to input key, value pairs.

IwdAttibuteInfo info=wdcontext.node<nodename>().getNodeInfo().getAttribute(<Attribute name created in the Node>);

ISimpleTypeModifiable stm=info.getModifiableSimpleType();

IModifiableSimpleValueSet svs=stm.getSVServices().getModifiableSimpleValueSet();

svs.put(Key,Value);

as suggested. But dropdown lists are still blank.

Any help is appreciated!!

Thanks

Kiran

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Try creating the value attribute directly under the Context rather than in a Value Node.

ISimpleTypeModifiable myType =

wdThis.wdGetAPI().getContext().getModifiableTypeOf(

"<attribute>");

Regards,

S.Divakar

Former Member
0 Kudos

Hi,

Thank you for the replies. I got it resolved. There was an exception from some other stuff that was preventing this piece of code to execute.

Kiran

Former Member
0 Kudos

You are using a DropDownByKey and you have bound the "selectedKey" property to the attribute with the value set?

Armin