[app.component.html]
. . .
<ejs-textbox #textbox (input)="input($event)"></ejs-textbox>
<ejs-grid #grid [dataSource]='data' (dataBound)="dataBound($event)" height='350'>
<e-columns>
<e-column type="checkbox" width='50'></e-column>
<e-column field='CustomerID' headerText='Customer ID' width='120' textAlign='Right'></e-column>
</e-columns>
</ejs-grid>
. . .
[App.component.ts]
. . .
ngOnInit(): void {
this.data = orderDetails;
}
input(e){
this.flag=true;
this.grid.search(e.value);
}
dataBound(e){
if(this.flag){
this.grid.selectRows([1,2]);
this.flag= false;
setTimeout((e)=>{ this.Search_box.focusIn();},)
}
}
. . . |