<div *ngFor="let services of services">
<ejs-checkbox (change)="onChangeq($event,services)"
label="{{services.serviceName}}" [checked]="services.isChecked"></ejs-checkbox>
</div>
services = [
{ "serviceName": "ASP.NET MVC", "isChecked": false }, // provide default checked value for checkbox based on your need
{ "serviceName": "ASP.NET CORE ", "isChecked": false },
{ "serviceName": "ANGULAR", "isChecked": false }
] |
Hi Amrutha,Thank you for contacting Syncfusion support.We have checked your reported requirement and we would like to let you know that it can be achievable in CheckBox by using checked property. Instead of maintaining the variable checkedServices to push the selected value, you can maintain the variable for checked property (two-way binding) in your salonSerivesData itself and bind it to checked property as like in the below code example.Code Example
<div *ngFor="let services of services"><ejs-checkbox (change)="onChangeq($event,services)"label="{{services.serviceName}}" [checked]="services.isChecked"></ejs-checkbox></div>services = [{ "serviceName": "ASP.NET MVC", "isChecked": false }, // provide default checked value for checkbox based on your need{ "serviceName": "ASP.NET CORE ", "isChecked": false },{ "serviceName": "ANGULAR", "isChecked": false }]For your convenience, we have prepared the sample based on our suggestion with dummy service data. Please find the link below.Meanwhile, we would like to let you know the following details to check further.1. Confirm whether you have rendered the checkedbox in any modal?2. Explain in more details for this requirement “The user goes to edit mode; selected checkboxes need to be checked.”3. Specify your exact use case scenario.Could you please check the above details and get back to us with the requested details to proceed further?Regards,Vinoth Kumar S
Thread ID: | Created: | Updated: | Platform: | Replies: |
146916 | Aug 26,2019 05:31 AM UTC | Aug 27,2019 08:14 AM UTC | Angular - EJ 2 | 2 |
Tags: CheckBox |
<div *ngFor="let services of services"> <ejs-checkbox (change)="onChangeq($event,services)" label="{{services.serviceName}}"[checked]="services.isChecked"></ejs-checkbox> </div> services = [ { "serviceName": "ASP.NET MVC", "isChecked": false }, // provide default checked value for checkbox based on your need { "serviceName": "ASP.NET CORE ", "isChecked": false }, { "serviceName": "ANGULAR", "isChecked": false } ] |
Hi Amrutha,Thank you for contacting Syncfusion support.We have checked your reported requirement and we would like to let you know that it can be achievable in CheckBox by using checked property. Instead of maintaining the variable checkedServices to push the selected value, you can maintain the variable for checked property (two-way binding) in your salonSerivesData itself and bind it to checked property as like in the below code example.Code Example
<div *ngFor="let services of services"><ejs-checkbox (change)="onChangeq($event,services)"label="{{services.serviceName}}" [checked]="services.isChecked"></ejs-checkbox></div>services = [{ "serviceName": "ASP.NET MVC", "isChecked": false }, // provide default checked value for checkbox based on your need{ "serviceName": "ASP.NET CORE ", "isChecked": false },{ "serviceName": "ANGULAR", "isChecked": false }]For your convenience, we have prepared the sample based on our suggestion with dummy service data. Please find the link below.Meanwhile, we would like to let you know the following details to check further.1. Confirm whether you have rendered the checkedbox in any modal?2. Explain in more details for this requirement “The user goes to edit mode; selected checkboxes need to be checked.”3. Specify your exact use case scenario.Could you please check the above details and get back to us with the requested details to proceed further?Regards,Vinoth Kumar S