mercredi 20 décembre 2017

How to use ag-grid checkbox with angular

enter image description here

How to bind the checkbox value with event.and how to access the curresponding data?

home.ts

 columns = [
 {
  field: 'reportingLocation',
  headerName: 'Reporting Location '
 },
 {
  field: 'country',
  headerName: 'Country Name'
 },
 {
  field: 'DEL',
  headerName: 'DEL',
  editable:true,
  headerCheckboxSelection: true,
  headerCheckboxSelectionFilteredOnly: true,
  checkboxSelection: true
 } ];

And i have one function to get the rows with DEL=TRUE

 deleteLocations(e) {
console.log(this.list);
e.preventDefault();
this.list
.filter((item: any) => {
  return !!item.DEL;
})
.map(item => {
  this.store.dispatch(new

 LocationAndResponsibilityActions.OnLocationDelete(item.location_Id));
  });  }

I could not access the DEL Value,What is the proper way to use aggrid checkbox selection?




Aucun commentaire:

Enregistrer un commentaire