[FIXED] [#131] Tab and Enter navigation does not work with CellEditing plugin with RowSelectionModel

  1. #1

    [FIXED] [#131] Tab and Enter navigation does not work with CellEditing plugin with RowSelectionModel

    In example below, click on first cell, then press TAB or ENTER. TAB should go to next editing cell in the row. ENTER should go to next row. Both do not work. Switch to CellSelectionModel and it works.

    <script runat="server">
            
        Private Sub storePlans_RefreshData(ByVal sender As Object, ByVal e As Ext.Net.StoreReadDataEventArgs) Handles storePlans.ReadData
            
            Me.storePlans.DataSource = GetGridData()
            Me.storePlans.DataBind()
    
    
          
        End Sub
        
        Private Function GetGridData() As IEnumerable
            Dim list As New System.Collections.Generic.List(Of Object)
            
            list.Add(New With {.ENTITYGUID = Guid.NewGuid(), .Column1 = "Test"})
            list.Add(New With {.ENTITYGUID = Guid.NewGuid(), .Column1 = "Test2"})
            list.Add(New With {.ENTITYGUID = Guid.NewGuid(), .Column1 = "Test3"})
            list.Add(New With {.ENTITYGUID = Guid.NewGuid(), .Column1 = "Test4"})
    
    
            
            Return list
                   
        End Function
    
    
        
    </script>
    <!DOCTYPE html>
    <html>
    <head id="Head1" runat="server">
        <style type="text/css">
            
        </style>
    </head>
    <body>
        <form id="Form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" ScriptMode="Debug" Theme="Gray"
            DisableViewState="true" />
        <ext:Store runat="server" ID="storePlans" WarningOnDirty="false" AutoLoad="true"
            RemoteSort="true" ShowWarningOnFailure="false">
            <Proxy>
                <ext:PageProxy>
                    <RequestConfig Timeout="180000">
                    </RequestConfig>
                    <Reader>
                        <ext:JsonReader>
                        </ext:JsonReader>
                    </Reader>
                </ext:PageProxy>
            </Proxy>
            <Model>
                <ext:Model ID="Model1" runat="server" IDProperty="ENTITYGUID">
                    <Fields>
                        <ext:ModelField Name="ENTITYGUID">
                        </ext:ModelField>
                        <ext:ModelField Name="Column1">
                        </ext:ModelField>
                    </Fields>
                </ext:Model>
            </Model>
           
        </ext:Store>
        <ext:GridPanel runat="server" ID="gridPlans" StoreID="storePlans" AutoScroll="true">
            
            <ColumnModel>
                <Columns>
                    <ext:RowNumbererColumn ID="RowNumbererColumn1" runat="server" Locked="true">
                    </ext:RowNumbererColumn>
                    <ext:Column ID="Column1" DataIndex="Column1" runat="server" Width="200" Locked="false"
                        Text="Column1">
                        <Editor>
                            <ext:TextField>
                            </ext:TextField>
                        </Editor>
                    </ext:Column>
                      <ext:Column ID="Column2" DataIndex="Column1" runat="server" Width="200" Locked="false"
                        Text="Column1">
                        <Editor>
                            <ext:TextField>
                            </ext:TextField>
                        </Editor>
                    </ext:Column>
                  
                </Columns>
            </ColumnModel>
            <Plugins>
                <ext:CellEditing ClicksToEdit="1">
                </ext:CellEditing>
            </Plugins>
        </ext:GridPanel>
        </form>
    </body>
    </html>
    Last edited by Daniil; Jan 22, 2013 at 4:11 AM. Reason: [OPEN] [#131]
  2. #2
    Hello!

    Quote Originally Posted by jchau View Post
    In example below, click on first cell, then press TAB or ENTER. TAB should go to next editing cell in the row.... Switch to CellSelectionModel and it works.
    Yes, it's strange we are investigating. Please, apply the following overriding:

    <script>
    	Ext.override(Ext.selection.RowModel, {
    		onEditorTab: function (editingPlugin, e) {
    			var me = this,
    				view = me.views[me.views.length - 1],
    				record = editingPlugin.getActiveRecord(),
    				header = editingPlugin.getActiveColumn(),
    				position = view.getPosition(record, header),
    				direction = e.shiftKey ? 'left' : 'right';
    			do {
    				position = view.walkCells(position, direction, e, me.preventWrap);
    			} while (position && (!view.headerCt.getHeaderAtIndex(position.column).getEditor(record) || !editingPlugin.startEditByPosition(position)));
    		}
    	});
    </script>
    Quote Originally Posted by jchau View Post
    ...ENTER should go to next row. ...
    Sorry, why do you think that this functionality should exist? I didn't find any information about this.
  3. #3
    Hi everybody,

    Re: moving editor on Tab in locking grid

    I reported to Sencha.
    http://www.sencha.com/forum/showthread.php?254342

    Re: moving editor on Enter

    @Baidaly, this functionality is Ext 3. It would be nice to get it back in Ext 4. I tried to report it as a bug.
    http://www.sencha.com/forum/showthread.php?254344
  4. #4
    Sencha opened bug tickets for the both cases.

    We created an Issue to track it.
    https://github.com/extnet/Ext.NET/issues/131
  5. #5
    Quote Originally Posted by Daniil View Post
    Re: moving editor on Enter

    @Baidaly, this functionality is Ext 3. It would be nice to get it back in Ext 4. I tried to report it as a bug.
    http://www.sencha.com/forum/showthread.php?254344
    Here is a possible solution.
    http://forums.ext.net/showthread.php?21924
  6. #6
    Tab on ExtJS 6.5.1 works now as expected. And by design, the <enter> key confirms/dismisses editing instead of jumping to the next row. This behavior can be overridden by the KeyMap component.

    So, both the Sencha team and the Ext.NET team can no longer reproduce this issue as of Ext.NET 4.x.

    Please let us know if you run into the same problem with Ext.NET 4.x (or higher) and we will reopen this Issue for investigation. Going forward, support for this issue can only be provided for Ext.NET 4.x (or higher).
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 3
    Last Post: Aug 17, 2017, 8:11 PM
  2. [CLOSED] Tooltip doesn't work with CellEditing plugin
    By xeo4.it in forum 3.x Legacy Premium Help
    Replies: 5
    Last Post: Jun 01, 2016, 3:00 PM
  3. Replies: 3
    Last Post: Nov 22, 2013, 10:13 PM
  4. Replies: 5
    Last Post: Aug 28, 2013, 2:33 PM
  5. Replies: 2
    Last Post: Aug 23, 2013, 11:11 PM

Posting Permissions