Hello
I have problem with setting focus on ListGrid component. I have a following window: on top I have form with TextItem, in center part is grid, and panel with buttons on the bottom. I have added KeyPressHandler on the TextItem. When the TAB key was pressed I try to move focus from TextItem to grid using grid.focus() method. I run this window in two modes: CREATE and UPDATE. In CREATE mode at start I insert few records to grid using startEditingNew() method. but after inserting I call grid.endEditing() method. That is a difference between behaviour of window in these two modes.
And when I run window in update mode all works fine - when I press TAB key on textItem, grid gets a focus, next pressing TAB key moves focus to the first button on bottom panel. But in CREATE mode it doesn't work. When textItem is active and I press TAB key grid doesn't get a focus, but next pressing TAB key causes first button gets focus. Has anybody idea what can I do wrong ?
Thanks in advance
MarcinKa
I have problem with setting focus on ListGrid component. I have a following window: on top I have form with TextItem, in center part is grid, and panel with buttons on the bottom. I have added KeyPressHandler on the TextItem. When the TAB key was pressed I try to move focus from TextItem to grid using grid.focus() method. I run this window in two modes: CREATE and UPDATE. In CREATE mode at start I insert few records to grid using startEditingNew() method. but after inserting I call grid.endEditing() method. That is a difference between behaviour of window in these two modes.
And when I run window in update mode all works fine - when I press TAB key on textItem, grid gets a focus, next pressing TAB key moves focus to the first button on bottom panel. But in CREATE mode it doesn't work. When textItem is active and I press TAB key grid doesn't get a focus, but next pressing TAB key causes first button gets focus. Has anybody idea what can I do wrong ?
Thanks in advance
MarcinKa