[OPEN] [#1476] [4.2.0] GridPanel CellEditing error when Column has Command

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [OPEN] [#1476] [4.2.0] GridPanel CellEditing error when Column has Command

    When using the CellEditing plugin and editing a column in a grid that contains an ImageCommand, I am getting a javascript error and the edit fails. The error is below as well as a simple example to recreate the issue. Just try to edit the grid and you should see the error. If I remove the ImageCommand the cell editing works fine.

    Uncaught TypeError: Cannot read property 'tdCls' of null
        at constructor.cellCommandRenderer (ext.axd?v=4.2.0:15330)
        at constructor.renderer (ext.axd?v=4.2.0:4355)
        at Object.callback (ext.axd?v=4.2.0:5334)
        at constructor.handleUpdate (ext.axd?v=4.2.0:130021)
        at constructor.onUpdate (ext.axd?v=4.2.0:113941)
        at constructor.fire (ext.axd?v=4.2.0:11880)
        at constructor.doFireEvent (ext.axd?v=4.2.0:12476)
        at constructor.prototype.doFireEvent (ext.axd?v=4.2.0:35965)
        at constructor.fireEventArgs (ext.axd?v=4.2.0:12382)
        at constructor.fireEvent (ext.axd?v=4.2.0:12357)

    <%@ Page Language="C#" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                this.BindData();
            }
        }
        private void BindData()
        {
            Store store = this.GridPanel1.GetStore();
    
            store.DataSource = this.Data;
            store.DataBind();
        }
    
        private object[] Data
        {
            get
            {
                DateTime now = DateTime.Now;
    
                return new object[]
                {
                    new object[] { "3m Co"}
                };
            }
        }
    </script>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <link href="/resources/css/examples.css" rel="stylesheet" />
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:GridPanel
                ID="GridPanel1"
                runat="server"
                Title="Array Grid"
                Width="400" Height="600">
                <Store>
                    <ext:Store ID="Store1" runat="server">
                        <Model>
                            <ext:Model runat="server">
                                <Fields>
                                    <ext:ModelField Name="company" />
                                </Fields>
                            </ext:Model>
                        </Model>
                    </ext:Store>
                </Store>
                <ColumnModel runat="server">
                    <Columns>
                        <ext:Column runat="server" Text="Company" DataIndex="company" Flex="1">
                            <Editor>
                                <ext:TextField runat="server"></ext:TextField>
                            </Editor>
                            <Commands>
                                <ext:ImageCommand CommandName="Clear" Icon="Delete"></ext:ImageCommand>
                            </Commands>
                        </ext:Column>
                    </Columns>
                </ColumnModel>
                <Plugins>
                    <ext:CellEditing runat="server"></ext:CellEditing>
                </Plugins>
            </ext:GridPanel>
        </form>
    </body>
    </html>
    Last edited by fabricio.murta; May 12, 2017 at 6:18 PM.

Similar Threads

  1. Replies: 6
    Last Post: Mar 24, 2014, 7:03 AM
  2. [CLOSED] gridpanel - CellEditing causing javascript error
    By PriceRightHTML5team in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 04, 2013, 5:44 AM
  3. Replies: 6
    Last Post: Jun 20, 2013, 1:25 PM
  4. GridPanel Column Command?
    By peter.campbell in forum 1.x Help
    Replies: 1
    Last Post: Apr 08, 2011, 9:13 AM
  5. [CLOSED] [1.0] Command Column in Grid causes jscript error
    By chrisbranson in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jun 28, 2010, 4:04 PM

Tags for this Thread

Posting Permissions