cancel
Showing results for 
Search instead for 
Did you mean: 

Auto select saved value on radio button on view load.

0 Kudos

Dear All,

I have created an input form, I am using textboxes and radio button to input fields in my database, I need some help in Edit mode, when user opens the form, I want to select the saved value in my radio button group. I am unable to do that, please review my view and suggest,

<RadioButtonGroup columns="5"  id="rb_PC" selected="{ path: 'Item' }">
	<buttons>
	 <RadioButton id="rb_itm1" groupName="itm1" text="Item 1"/>
	 <RadioButton id="rb_itm2" groupName="itm2" text="Item 2"/>
	 <RadioButton id="rb_itm3" groupName="itm3" text="Item 3"/>
	 <RadioButton id="rb_itm4" groupName="itm4" text="Item 4"/>
	 <RadioButton id="rb_itm5" groupName="itm5" text="Item 5"/>
	</buttons>
</RadioButtonGroup>


Accepted Solutions (0)

Answers (1)

Answers (1)

former_member233511
Participant
0 Kudos

Hi, I don't know how you store selected value, but you should store selected index.

And as i know RadioButtonGroup control has no 'selected' property, it has 'selectedIndex'.

So in your case, if you have stored index of selected item, set it to the model, and then bind 'selectedIndex' of RadionButtonGroup to according path.