**** how ag grid click on checkbox get select row data****
***> any one help how can achieve thanks advance the requirement is simple i want to click on checkbox and get selected row data i use onSelectionchange method from ag grid documentation but resolve my problems`
`***
*typescript code try*
onSelectionChanged(params) {
let selectedRow = params.api.getSelectedNodes();
this.selectedCustomerFilter.push(selectedRow.find(function (item) {
debugger
return item.rowIndex
}));
if (this.selectedCustomerFilter.length > 0) {
this.tblSearchbarHidden = true;
} else {
this.tblSearchbarHidden = false;
}
this.selectedCustomerFilter.forEach((element, rowIndex) => {
if (rowIndex > 4) {
this.selectedCustomerFilter.pop(params, 1);
element.setSelected(false);
this.alertService.info("You can only compare up to five selections")
return
}
})
}
**and html**
<ag-grid-angular>
[onSelectionChanged]="onSelectionChanged($event)"
</ag-grid-angular>
Aucun commentaire:
Enregistrer un commentaire