on 10-01-2008 2:07 PM
Hi
I am using radiobuttongroupbykey ui element. One radio button should be selected by default. How can i do it?
Thanks
Vidyadhar
Edited by: Vidyadhar N on Oct 1, 2008 3:07 PM
Hi,
if the attribute is of simple type.
then if you want to select second radio button ie male.
then in simple type see what is the enumeration value and enumeration text for the male.
then do the following to select the male.
wdContext.currentContextElement().set<Attribute bind to the radio buttons group>("enumeration value for male");
if example m is enumeration value and male is enumeration text then
wdContext.currentContextElement().set<Attribute bind to the radio buttons group>("m");
hope it helps.
Regards,
ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Say you have bound the "selectedKey" property to some context attribute "key" and the "keyToSelect" property of the radio button that should be selected is "3". Then
wdContext.currentContextElement().setKey("3");
will select that radio button and deselect all others.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry. That was for single radio buttons. For RadioButtonGroupByKey, just set the value of the context attribute to which the "selectedKey" property is bound.
This attribute must have a DDIC type with value set. If you have for example the value set
{("S", "Small"), ("M", "Medium"), ("L", "Large")}
then you can select the radio button for "Medium" with
wdContext.currentContextElement().setKey("M");
Armin
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.