[CLOSED] Can't select items in combobox in gridpanel's component column using arrow keys

  1. #1

    [CLOSED] Can't select items in combobox in gridpanel's component column using arrow keys

    Hi,

    I am using grid panel in which I have component column which has a combobox as component.
    When I reach to combobox and select any value using arrow key and press enter then cursor is navigating
    to another combobox in next row instead of selecting value for selected item from combobox.
    Please suggest the way to select any value in combobox using arrow keys.
    Last edited by Daniil; Jul 10, 2013 at 4:26 AM. Reason: [CLOSED]
  2. #2
    Hi @alscg,

    It behaves in this manner due to the onEnterKey function.
    http://docs.sencha.com/extjs/4.2.1/#...hod-onEnterKey

    I can suggest you to override this function to get the behavior you need.

    Here you can find some details regarding the problem.
    http://www.sencha.com/forum/showthread.php?256865
  3. #3
    Finally, I think the problem is in a ComponentColumn, not in ExtJS.

    Here is a test case. It reproduces two issues.

    1. No way to select a ComboBox's item by Enter. Moreover, Enter focuses a ComboBox of next rows.

    2. Focus a ComboBox and press Tab => a JavaScript error occurs.

    Example
    <%@ Page Language="C#" %>
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                Store store = this.GridPanel1.GetStore();
                store.DataSource = new object[] 
                { 
                    new object[] { "test1", "test2", "test3" },
                    new object[] { "test4", "test5", "test6" },
                    new object[] { "test7", "test8", "test9" }
                };
            }
        }
    </script>
    
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:GridPanel ID="GridPanel1" runat="server">
                <Store>
                    <ext:Store runat="server">
                        <Model>
                            <ext:Model runat="server">
                                <Fields>
                                    <ext:ModelField Name="test1" />
                                    <ext:ModelField Name="test2" />
                                    <ext:ModelField Name="test3" />
                                </Fields>
                            </ext:Model>
                        </Model>
                    </ext:Store>
                </Store>
                <ColumnModel runat="server">
                    <Columns>
                        <ext:Column runat="server" Text="Test1" DataIndex="test1" />
    
                        <ext:ComponentColumn runat="server" Text="Test2" DataIndex="test2">
                            <Component>
                                <ext:ComboBox runat="server">
                                    <Items>
                                        <ext:ListItem Text="Item 1" />
                                        <ext:ListItem Text="Item 2" />
                                    </Items>
                                </ext:ComboBox>
                            </Component>
                        </ext:ComponentColumn>
    
                        <ext:Column runat="server" Text="Test3" DataIndex="test3" />
                    </Columns>
                </ColumnModel>
            </ext:GridPanel>
        </form>
    </body>
    </html>
  4. #4
    Enter functionality can be fixed by setting MoveEditorOnEnter="false" for ComponentColumn
    We will fix Enter without that property
  5. #5
    Both issues are fixed in SVN

Similar Threads

  1. Replies: 16
    Last Post: Dec 26, 2012, 4:06 PM
  2. Replies: 23
    Last Post: Nov 21, 2012, 12:24 PM
  3. Replies: 1
    Last Post: Jan 25, 2012, 8:14 AM
  4. [CLOSED] Navigate Grid with Arrow Keys
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 29, 2011, 7:31 PM
  5. Replies: 1
    Last Post: Mar 19, 2010, 8:35 PM

Posting Permissions