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

4 posts, 0 answers
  1. Jark Monster
    Jark Monster avatar
    46 posts
    Member since:
    Jan 2012

    Posted 10 May 2013 Link to this post

    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.

  2. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 14 May 2013 Link to this post

    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!
  3. Jark Monster
    Jark Monster avatar
    46 posts
    Member since:
    Jan 2012

    Posted 15 May 2013 Link to this post

    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
  4. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 17 May 2013 Link to this post

    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!
Back to Top