Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
142838 | Feb 21,2019 12:00 PM UTC | Feb 25,2019 04:48 AM UTC | Angular - EJ 2 | 5 |
![]() |
Tags: Grid |
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
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.