Results 1 to 2 of 2

Thread: Ext - Only allow focus in inputs inside grid panel

  1. #1
    Sencha User
    Join Date
    Aug 2016
    Posts
    1
    Vote Rating
    0
      0  

    Default Ext - Only allow focus in inputs inside grid panel

    I have a trouble with such a very specific thing of Ext 3.4
    I have a grid with a store which its result is then loaded in the grid. The render contains some text fields and some input (all of them are type=text).
    I need to implement that when the user press tab in the text A, the focus must be set in B. If I press tab again, if C is enabled then C must be focused, if C is disabled, the focus must be set in the A located in the next row. Then, if C has focus and I press tab, I must jump to D.
    I could jump from A to B by adding tabindex but then, when pressing tab again, the focus is changed to the first column (which has a label) and after pressing tab again, the focus passes to that column content (a, image, whatever).
    The same behaviour I had if I focus elements with jQuery.
    I do not know if it helps but this is the code:





    var selModel =newExt.grid.RowSelectionModel({ singleSelect:true, listeners:{ beforerowselect:function(sm, row_index, keepExisting, record){ sm.suspendEvents();if(sm.isSelected(row_index)){// row already selected, deselect it (note: other selections remain intact on deselect). sm.deselectRow(row_index);}else{ sm.selectRow(row_index,true)} sm.resumeEvents();returnfalse;}}}); selModel.isValidRow =true;// To prevent trash html when the user navigates between sectionsif(this.grid){this.grid.destroy();}this.grid =newExt.grid.EditorGridPanel({ id:'auctions_grid_'+ muniaxis.auctions.Form.activeAuctionsButton, store: store, syncFocus:true, colModel: muniaxis.colHelper.getColumnModel(columns), tbar: tbar, bbar: bbar, frame:true, sm: selModel, autoScroll:true, autoWidth:true, cls:'grid', stripeRows:true, loadMask:{ msg: viewData.resources.waitingMessage }, viewConfig:{ emptyText: viewData.resources.gridEmptyMessage, forceFit:true, autoFill:true, scrollOffset:1, getRowClass: muniaxis.renders.getRowClass }});

  2. #2
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    9,531
    Vote Rating
    257
      0  

    Default

    Perhaps you could listen to the specialkey event to catch the tab presses and apply your logic there.


    Join me at SenchaCon 2016!

Similar Threads

  1. Replies: 1
    Last Post: 20 May 2015, 7:00 AM
  2. How do I focus a combo box inside a grid panel?
    By cbmeeks in forum Ext: Discussion
    Replies: 13
    Last Post: 20 Jul 2011, 10:17 AM
  3. Order of 'html' in a tab panel with inputs...
    By travisbell in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 14 Oct 2009, 1:20 PM
  4. [solved] Grid inside Tabs inside Panel ... grid wont render
    By amegahed in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 4 Jul 2009, 6:43 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •