|
<ejs-grid #normalgrid id='Normalgrid' [dataSource]='data' allowPaging='true' [pageSettings]='pageSettings' [editSettings]='editSettings' (recordDoubleClick)='onDoubleClick($event)'
(actionComplete)='actionComplete($event)' [toolbar]='toolbar' (actionBegin)='actionBegin($event)'>
…………….
</ejs-grid>
[app.component.ts]
onDoubleClick(args: any): void{
this.setFocus = args.column; // Get the column from Double click event
}
actionComplete(e: any): void{
if (e.requestType === 'beginEdit') {
e.form.elements.namedItem(this.setFocus.field).focus(); // Set focus to the Target element
}
}
|
Hi, guys, the code above works until I use additionally editType= 'numericedit'. Pls, advise, how to keep both auto increase of
cell and make focus working, thanks in advance
|
[app.component.ts]
actionComplete(e: any): void {
if (e.requestType === 'beginEdit') {
e.form.querySelector('#'+this.normalgrid.element.id+this.setFocus.field).focus();
}
} |
|
actionComplete(e: any): void {
if (e.requestType === 'beginEdit') {
if (this.setFocus.field === 'ShipCountry') {
setTimeout(function(e){
e.form.elements[6].focus();
}.bind(this),0, e);
}
else {
e.form.querySelector('#' + this.normalgrid.element.id + this.setFocus.field).focus();
}
}
} |