on 03-11-2006 7:22 AM
hi, to all
In my application there are two radio button and on initilization of a view by default a wrong radio button is selected. I want to change that. And want to select the other radio by default.
Please help me out.
Regards
HI Jitender,
Assume that u r having 2 Radio buttons R1 and R2.
For this u create 3 attributes R1,R2 and Sel.
For the radio button R1:
set the element properties as:
keytoselect---R1
selected key --Sel
For the radio button R2:
set the element properties as:
keytoselect---R2
selected key --Sel
In implementation part :
public void wdDoInit()
{
//@@begin wdDoInit()
wdContext.currentContextElement().setR1("Pass");
wdContext.currentContextElement().setR2("Fail");
wdContext.currentContextElement().setSel("Pass");
//@@end
}
SO from the above code the default radio button R1 will be enabled.
If u want the second radio button to be default then change sel to
wdContext.currentContextElement().setSel("Fail");
so during run time when u select the first one automatically its selvalue changes according to the radio button's value.
Regards,
Krishnam Raju.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Set the selectedKey property to appropriate keyToSelect's value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.