[CLOSED] Tab navigation issue in Editable GridPane

  1. #1

    [CLOSED] Tab navigation issue in Editable GridPane

    Hi:

    I got a tab navigation issue for gridpanel. I have a gridpanel with spinnerfield editor.
    I have three rows show on the grid. The first and third row can be edit but the second row is un-editable. I am using "BeforeEdit" listener which will return the editor when user clicked cell in first and third rows. Everything is working fine if user click the cell to edit. When user uses tab button navigate on the page, things changed. When tab from last cell in the first row to next cell, the navigate will stop on the second row which is un-editable. In this case, could I make it automatically navigate to the first cell of third row which is editable?

    Thank you
    Last edited by geoffrey.mcgill; Sep 28, 2011 at 3:42 AM. Reason: [CLOSED]
  2. #2
    Hi,

    I can suggest this solution:
    <BeforeEdit Handler="var edit = e.row !== 1;
                        (function () {
                            if (!edit) {
                            e.grid.startEditing(e.row + 1, e.column);
                            }
                        }).defer(1);
                        return edit;" />
    Here is a full example.

    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" },
                    new object[] { "test2" },
                    new object[] { "test3" },
                };
                store.DataBind();
            }
        }
    </script>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.Net Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:GridPanel ID="GridPanel1" runat="server" AutoHeight="true">
                <Store>
                    <ext:Store runat="server">
                        <Reader>
                            <ext:ArrayReader>
                                <Fields>
                                    <ext:RecordField Name="test" />
                                </Fields>
                            </ext:ArrayReader>
                        </Reader>
                    </ext:Store>
                </Store>
                <ColumnModel runat="server">
                    <Columns>
                        <ext:Column Header="Test" DataIndex="test">
                            <Editor>
                                <ext:SpinnerField runat="server" />
                            </Editor>
                        </ext:Column>
                    </Columns>
                </ColumnModel>
                <Listeners>
                    <BeforeEdit Handler="var edit = e.row !== 1;
                                         (function () {
                                             if (!edit) {
                                                e.grid.startEditing(e.row + 1, e.column);
                                             }
                                         }).defer(1);
                                         return edit;" />
                </Listeners>
            </ext:GridPanel>
        </form>
    </body>
    </html>

Similar Threads

  1. [CLOSED] Editable Grid Tab Navigation Issues
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 10
    Last Post: Dec 27, 2011, 1:20 PM
  2. [CLOSED] Tabs navigation issue.
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 22, 2011, 2:18 PM
  3. [CLOSED] Editable Grid - Checkbox issue...
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 23, 2010, 10:33 AM
  4. [CLOSED] [1.0] IE Issue with Editable GridPanel
    By ljankowski in forum 1.x Legacy Premium Help
    Replies: 31
    Last Post: May 07, 2010, 5:48 PM
  5. [CLOSED] Editable ComboBox issue
    By methode in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 03, 2009, 4:04 PM

Posting Permissions