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

Batch Grid - Tabbing into grid from outside input does not kick first selected cell into edit mode

3 Answers 128 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jark Monster
Top achievements
Rank 1
Jark Monster asked on 10 May 2013, 06:30 PM
I have a batch grid that is part of a larger form.  Kendo UI version is: 2013.1.319

What I would like to accomplish is when I hit tab in the last form field before the grid, have it select the first column in the first row of the grid and kick that cell into edit mode.

Currently, when I do this the grid selects the cell (It gets highlighted), but it does not transition the cell into edit mode.  If I hit tab once more, then the next column is selected AND the cell is kicked into edit mode.

This issue is present in the Batch Editing Demo on the Kendo UI site here.

Steps to recreate:
  1. Click "Cancel Changes" so that that button has the focus.
  2. Hit tab.  Here you'll see a dotted line surround the k-content area.
  3. Hit tab again.  The cell with Product Name of "Chai" will be selected, but it's editor template will not appear
  4. If you hit tab once more, the next column is selected (Unit Price: $18.00).  In this case you'll see the numeric textbox kick in and the cell is in edit mode.

I've done some digging myself on my side by logging the grid's Edit event, and I can verify that the event is not being fired when the first cell is highlighted, but it is being fired when that last tab occurs (when the second column becomes a text field).

Does there happen to be a simple way of resolving this issue that I'm overlooking?

Thanks.

3 Answers, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 14 May 2013, 03:13 PM
Hello Mark,

Indeed this is by design. In few words - the Grid puts the cell in edit mode only if the focus before that was again inside of the Grid.

Other way we cannot determine if the Grid gained focus by pressing the TabKey.

Kind Regards,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jark Monster
Top achievements
Rank 1
answered on 15 May 2013, 02:11 PM
Hello Petur,

Thank you for your reply.

I was wondering if you had any tips for working around this?

I looked for an event similar to focus, but I was unable to find one, but it would be great if I could somehow capture when the grid first gains focus because I could just initiate the editing of the first cell myself.

If there is no current event for such a thing, I suppose I could take a stab at binding a focus event to the grid and discern if the focus came from tab or click and then go from there.

Please let me know if you have any other suggestions for helping me get around this.

Thanks!
-mark
0
Petur Subev
Telerik team
answered on 17 May 2013, 11:02 AM
Hello again Mark,

Sadly I cannot think of a work-around to this scenario, other way I would suggest you such.

Kind regards,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Jark Monster
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Jark Monster
Top achievements
Rank 1
Share this question
or