Hello,

When you edit the contents of a cell and then press a button inside the gridpanel, whether it's in the Buttons section or the BottomBar section, the button does nothing. The only thing that seems to happen is the grid losing focus and applying the new value to the cell. If you press the button again, now it works. This didn't happen in 1.x: buttons always responded even when inline editing.

You can verify this behavior with this code:

<%@ 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)
        {
            var data = new[] { new { Id = 1, Value = 10 }, new { Id = 2, Value = 12 } };
            this.strDemo.DataSource = data;
        }
    }
    
</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 id="Head1" runat="server">
    <title>Cell Editor Focus Issue</title>
</head>
<body>
    <ext:ResourceManager ID="ResourceManager1" runat="server" />
    <h1>Cell Editor Focus Issue</h1>

    <ext:Store ID="strDemo" runat="server">
        <Model>
            <ext:Model runat="server">
                <Fields>
                    <ext:ModelField Name="Id" Type="Int" />
                    <ext:ModelField Name="Value" Type="Int" />
                </Fields>
            </ext:Model>
        </Model>
    </ext:Store>

    <ext:GridPanel ID="myGrid" runat="server" StoreID="strDemo" Height="200" Title="Cell Editor" EnableColumnMove="false" SortableColumns="false">
        <ColumnModel runat="server">
            <Columns>
                <ext:Column runat="server" Text="Id" DataIndex="Id" MenuDisabled="true" />
                <ext:Column runat="server" Text="Value" DataIndex="Value" MenuDisabled="true">
                    <Editor>
                        <ext:NumberField runat="server" />
                    </Editor>
                </ext:Column>
            </Columns>
        </ColumnModel>
        <Plugins>
            <ext:CellEditing runat="server" ClicksToEdit="1" />
        </Plugins>
        <Buttons>
            <ext:Button runat="server" Text="Button 1">
                <Listeners>
                    <Click Handler="alert('Button 1');" />
                </Listeners>
            </ext:Button>
        </Buttons>
        <BottomBar>
            <ext:Toolbar runat="server">
                <Items>
                    <ext:ToolbarFill runat="server" />
                    <ext:Button runat="server" Text="Button 2">
                        <Listeners>
                            <Click Handler="alert('Button 2');" />
                        </Listeners>
                    </ext:Button>
                </Items>
            </ext:Toolbar>
        </BottomBar>
    </ext:GridPanel>
    <ext:Button runat="server" Text="Button 3">
        <Listeners>
            <Click Handler="alert('Button 3');" />
        </Listeners>
    </ext:Button>

</body>
</html>
Type any number in the Value column and then try to press buttons 1 or 2. They won't work. You first need the grid to lose focus for those buttons to work. Button 3, outside the grid, always works.

Is there a way to make the grid buttons work even when editing a cell?

Thanks and regards,

Andrew