Hi Shamil,
Thanks for contacting Syncfusion support.
Before proceeding with your requirement, please check and address the below queries regarding your requirement to provide better solution from our end.
1. How checkbox column is rendered in your cell using column template or checkbox selection column [CheckBox Selection]?2. Did you enabled any editing in your grid? If so please share the edit type.
Regards,Madhu Sudhanan P
export class DefaultComponent implements OnInit {
public data: Object[] = [];
public item: Object = {};
ngOnInit(): void {
this.data = orderDetails;
}
click(): void {
console.log(this.item); //Get the checkbox values here...
}
}
<ng-template #template let-data>
<input type="checkbox" ejs-checkbox (input)="item[data.OrderID] = $event.target.checked"/>
</ng-template>
|
Hi Shamil,
Thanks for the update.
We have prepared the below sample in which the checkbox state is added to the property [items] in component class. And you can use this property to access the checkbox values at the button click. The template used will be as follows.
export class DefaultComponent implements OnInit {public data: Object[] = [];public item: Object = {};ngOnInit(): void {this.data = orderDetails;}click(): void {console.log(this.item); //Get the checkbox values here...}}
<ng-template #template let-data><input type="checkbox" ejs-checkbox (input)="item[data.OrderID] = $event.target.checked"/></ng-template>
Regards,Madhu Sudhanan P