Hi Ali,
Thanks for the update.
The rowSelected and rowSelecting are event of the grid component which can be registered to the grid using () method in the component template.
<ejs-grid . . . (rowSelecting)="rowSelecting($event)">
. . . .
</ejs-grid>
|
It is not possible to register them inside the ngOnInit event as the grid is not initialized. If you want to bind the event handlers programmatically then please use ngViewAfterInit hook to bind the event as follows.
export class DefaultComponent implements OnInit {
public data: Object[] = [];
@ViewChild('grid')
public grid: GridComponent;
...
ngAfterViewInit(): void {
this.grid.rowSelecting.subscribe((e) => console.log('rowSelecting'));
this.grid.rowSelected.subscribe((e) => console.log('rowSelected'));
}
}
|
If we misunderstood your requirement then please provide more information regarding your requirement.
Regards,
Madhu Sudhanan P