This is a migrated thread and some comments may be shown as answers.

Prevent addRow() changing focus

1 Answer 67 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jakob
Top achievements
Rank 1
Jakob asked on 23 Jul 2015, 04:20 PM

Hi,

how can I prevent that grid.addRow sets the focus into my grid?

Thanks

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 27 Jul 2015, 07:18 AM
Hello Jakob,

Once you call the addRow method you can get reference to the active element on the page and call its blur method:
var grid = $("#grid").data("kendoGrid");
grid.addRow();
setTimeout(function () {
    document.activeElement.blur();
})

Below is an example with the mentioned approach:
Hope this helps.


Regards,
Konstantin Dikov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Jakob
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or