Radio button does not show checked

Hi 

I have following code, 

var data=[
{Id:"Budget",Display:"Approved Budget",Checked:false},
{Id:"Forecast",Display:"Forecast",Checked:true},
{Id:"Proposed",Display:"Proposed",Checked:false},
{Id:"Actuals",Display:"Actuals",Checked:false}];


<div data-role="fieldcontain" style="width: 100%;">
<fieldset data-role="controlgroup" data-type="horizontal" style="display:flex;padding-left: 3px;">
<legend></legend>
<div *ngFor="let item of Dimensions" style="padding-left: 5px;">
<ejs-radiobutton #radioElement name="Dimensions" id="{{item.Id}}" value="{{item.Id}}" label="{{item.Display}}" checked="{{item.Checked}}" (click)="radioClick($event)"></ejs-radiobutton>
</div>
</fieldset>
</div>

This does not work and it does not show radio button checked.

Thanks
Parth

1 Reply 1 reply marked as answer

SP Sangeetha Priya Murugan Syncfusion Team April 6, 2021 12:08 PM UTC

Hi PDev, 
 
Thank you for contacting Syncfusion support. 
 
We have checked your reported issue and we would suggest you to use the checked property as like as below to achieve your requirement. 
 
<ejs-radiobutton 
        #radioElement 
        name="Dimensions" 
        id="{{item.Id}}" 
        value="{{item.Id}}" 
        label="{{item.Display}}" 
        [checked]="item.Checked" 
      ></ejs-radiobutton> 
 
 
For your convenience, we have prepared the sample based on your requirement. Please find the link below. 
 
 
Could you please check the above links and get back to us, if you need any further assistance on this. 
 
Regards, 
Sangeetha M 


Marked as answer
Loader.
Up arrow icon