Hi,
In the Grid’s API Docs – https://www.htmlelements.com/docs/grid-api/, take a look at the events section which shows how to handle events.
Here is an example for reference:
<smart-grid
#grid
[dataSource]="data"
[columns]="columns"
(cellBeginEdit)="onCellBeginEdit($event)"
(cellEndEdit)="onCellEndEdit($event)"
(rowSelect)="onRowSelect($event)"
></smart-grid>
onCellBeginEdit(event: CustomEvent) {
const { row, column } = event.detail;
console.log('Editing started for:', row, column);
}
onCellEndEdit(event: CustomEvent) {
const { row, column, value } = event.detail;
console.log(<code>New value in ${column.dataField}:</code>, value);
}
onRowSelect(event: CustomEvent) {
console.log('Selected row:', event.detail.row);
}
Hope this helps.
Best regards,
Markov
Smart UI Team
https://www.htmlelements.com/