Focus datatable on load?

In a datatable, I enable keyboard navigation using
navigation: true,

But I still need to click with the mouse on a row before I am able to navigate the datatable with the keyboard.

I then tried using this:

on: {
onAfterLoad: function() {
this.select(this.getFirstId());
}
}

This does select the first row in the datatable, but I am still not able to just press the arrow-keys to navigate. I still need to click a row with the mouse, before I can use the keyboard.
I think I somehow need to give focus to the datatable, but how? Using this.focus() inside the onAfterLoad-handler does not work.

-mads

Sorry, found this:

http://forum.webix.com/discussion/4720/default-navigation-in-table-view#latest

The solution is to use
webix.UIManager.setFocus( this );
inside the onAfterLoad-handler

Just wanted to add that in order to set focus to a specific row, first you need to call webix.UIManager.setFocus(this), then this.select(rowId).

Thanks @dandv. Saved me some troubleshooting time :slight_smile: