[FIXED] [1.2] Editable CheckColumn doesn't work

  1. #1

    [FIXED] [1.2] Editable CheckColumn doesn't work

    Hi everybody,
    I have this problem:
    I have a window with two TabPanel. In the second TabPanel I have a gridPanel with a Editable CheckColumn. If the previous Grid doesn't not rendered, when I close the window I obtain the following error:

    destroy:function(){if(this.grid){this.grid.getView().mainBody.un("mousedown",this.onMouseDown,this);}}
    'un' is undefined.
    Thanks.

    Tommaso
    Last edited by Daniil; Feb 21, 2012 at 3:40 PM. Reason: [FIXED] [1.2]
  2. #2
    Hi,

    Thanks for the report. We are investigating a possible fix.

    Here is the sample to reproduce.

    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[] { true },
                    new object[] { false }
                };
                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:TabPanel runat="server">
                <Items>
                    <ext:Panel runat="server" Title="Tab 1" />
                    <ext:GridPanel 
                        ID="GridPanel1" 
                        runat="server" 
                        Title="Tab 2" 
                        AutoHeight="true" 
                        Closable="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:CheckColumn Header="Test" DataIndex="test" Editable="true" />
                            </Columns>
                        </ColumnModel>
                    </ext:GridPanel>    
                </Items>
            </ext:TabPanel>
        </form>
    </body>
    </html>
  3. #3
    The bug ticket has been created.
    https://extnet.lighthouseapp.com/pro...gs/tickets/249

    The fix has been committed to SVN, revision #3838.

    The fix will be included in the v1.3 release.

    To fix it right now please add the following thing into a page <head>.

    Fix
    <ext:ResourcePlaceHolder runat="server" Mode="ScriptFiles" />
    
    <script type="text/javascript">
        Ext.grid.CheckColumn.prototype.destroy = function () {
            var body = this.grid ? this.grid.getView().mainBody : null;
            if (body) {
                body.un("mousedown", this.onMouseDown, this);
            }
        }
    </script>
    Thanks again for the report!
  4. #4
    Hi!

    Good! I update my code with this fix.

    Thanks Daniil

    Tommaso

Similar Threads

  1. Replies: 3
    Last Post: Jun 13, 2011, 4:17 PM
  2. Replies: 1
    Last Post: Dec 09, 2009, 12:10 PM
  3. Replies: 1
    Last Post: Jan 28, 2009, 7:36 PM
  4. Replies: 1
    Last Post: Oct 26, 2008, 5:49 PM
  5. Replies: 2
    Last Post: Mar 26, 2008, 9:41 AM

Tags for this Thread

Posting Permissions