on 07-11-2006 3:42 AM
Hi all,
I want to add values to the dropdownbykey UI Element at run time. Also I want to know how to get the selected item in the dropdown at runtime.
If anybody knows let me know Please.
Thanks.
Hi,
I hope this code will help you:
monthName :-Is value attribute of type string.
ISimpleTypeModifiable myType = wdThis.wdGetAPI().getContext().getModifiableTypeOf("monthName");
// Set allowed values for this data type
IModifiableSimpleValueSet values = myType.getSVServices()
.getModifiableSimpleValueSet();
values.put("0", "January");
values.put("1", "February");
values.put("2", "March");
values.put("3", "April");
values.put("4", "May");
wdContext.currentContextElement().setMonthName("4");
to get the selected value:
1. create an action and add that action to your dropdownbykey.
2. On action write this code:
wdContext.currentContextElement().getMonthName()
Regards,
Rajeev
Message was edited by: Rajeev Ranjan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.