[CLOSED] IE 7 - Grid Panel Row Double Click error

  1. #1

    [CLOSED] IE 7 - Grid Panel Row Double Click error

    Hi,

    I've just noticed a small bug in IE 7 (i've not tested in IE 6).

    I've got a Grid Panel set up to open a new window as follows:

    <AjaxEvents>
               <RowDblClick OnEvent="RowDblClick">
                        <ExtraParams>
                                 <ext:Parameter Name="ID" Value="this.getSelectionModel().getSelected().data['ID']" Mode="Raw" />
                                  <ext:Parameter Name="Type" Value="Events"  />
                                                            
                         </ExtraParams>
                          <EventMask ShowMask="true" MinDelay="25" Msg="Loading data, please wait...."   />
                </RowDblClick
    </AjaxEvents>
    If you single click the row, then double click I receive the following JS error:

    'this.getSelectionModel().getSelected().data' is null or not an object

    If I double-click a row (without single clicking first) the window opens correctly.

    I noticed this bug as in Firefox, a straight doubleclick doesn't work (doesn't report an error, just dblclick goes unrecognised) - you have to select the row first and then double click.

    I'm using the latest build in the SVN, although this also occurred in 0.7

    Cheers, Martin Hicks
  2. #2

    RE: [CLOSED] IE 7 - Grid Panel Row Double Click error

    Hi Martin,

    I can't reproduce the bug.
    Can you post own example?

    Here is my test case:
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Ext.IsAjaxRequest)
            {
                this.Store1.DataSource = new object[]
                {
                    new object[] {"3m Co", 71.72, 0.02, 0.03, "9/1 12:00am"},
                    new object[] {"Alcoa Inc", 29.01, 0.42, 1.47, "9/1 12:00am"},
                    new object[] {"Altria Group Inc", 83.81, 0.28, 0.34, "9/1 12:00am"},
                    new object[] {"Wal-Mart Stores, Inc.", 45.45, 0.73, 1.63, "9/1 12:00am"}
                };
    
                this.Store1.DataBind();
            }
        }
    
        protected void RowDblClick(object sender, AjaxEventArgs e)
        {
    
    
        }
    </script>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Debug" />
            
            <ext:Store ID="Store1" runat="server">
                <Reader>
                    <ext:ArrayReader>
                        <Fields>
                            <ext:RecordField Name="company" />
                            <ext:RecordField Name="price" Type="Float" />
                            <ext:RecordField Name="change" Type="Float" />
                            <ext:RecordField Name="pctChange" Type="Float" />
                        </Fields>
                    </ext:ArrayReader>
                </Reader>
            </ext:Store>
            
            <ext:GridPanel 
                ID="GridPanel1" 
                runat="server" 
                StoreID="Store1" 
                StripeRows="true"
                Title="Array Grid" 
                TrackMouseOver="true"
                Width="600" 
                Height="350"
                AutoExpandColumn="Company">
                <ColumnModel ID="ColumnModel1" runat="server">
                    <Columns>
                        <ext:Column ColumnID="Company" Header="Company" Width="160" Sortable="true" DataIndex="company" />
                        <ext:Column Header="Price" Width="75" Sortable="true" DataIndex="price">
                        </ext:Column>
                        <ext:Column Header="Change" Width="75" Sortable="true" DataIndex="change">
                        </ext:Column>
                        <ext:Column Header="Change" Width="75" Sortable="true" DataIndex="pctChange">
                        </ext:Column>
                    </Columns>
                </ColumnModel>
                <SelectionModel>
                    <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
                </SelectionModel>
                <AjaxEvents>
                       <RowDblClick OnEvent="RowDblClick">
                                <ExtraParams>
                                         <ext:Parameter Name="ID" Value="this.getSelectionModel().getSelected().data['ID']" Mode="Raw" />
                                          <ext:Parameter Name="Type" Value="Events"  />
                                                                    
                                 </ExtraParams>
                                  <EventMask ShowMask="true" MinDelay="25" Msg="Loading data, please wait...."   />
                        </RowDblClick>
                </AjaxEvents>
            </ext:GridPanel>  
        </form>
    </body>
    </html>
    Vladimir Shcheglov
    Sr. Developer
  3. #3

    RE: [CLOSED] IE 7 - Grid Panel Row Double Click error


  4. #4

    RE: [CLOSED] IE 7 - Grid Panel Row Double Click error


  5. #5

    RE: [CLOSED] IE 7 - Grid Panel Row Double Click error

    Hi sorry for the delay in getting back to you, I wasn't working yesterday.*

    I can confirm that your examples provided works correctly, however, I added to this a subset of the code I'm implementing, which hopefully demonstrates the problem.*

    When using IE 7, If you single click a row in my grid panel and then double click you receive and error (stated above).*

    Cheers, Martin Hicks

    PS. I'm having difficulty posting the code using the code tags, so I've added the code as an attachment
    Last edited by geoffrey.mcgill; Feb 22, 2011 at 5:05 AM.
  6. #6

    RE: [CLOSED] IE 7 - Grid Panel Row Double Click error

    Hi Martin,

    Thanks for example. I reproduced that behaivor for seconf grid with CheckBoxSelectionModel. It is not bug. *Just for CheckBoxSelectionModel select/deselect row performs after click. So, if you double clicking on selected row then you deselect first it. After deselect you try to read selected row but it is absent.

    I can suggest to change your RowDblClick parameter like this

    <ext:Parameter Name="ID" Value="this.store.getAt(rowIndex).data['ID']"*Mode="Raw" />
    Last edited by geoffrey.mcgill; Feb 22, 2011 at 5:07 AM.
    Vladimir Shcheglov
    Sr. Developer
  7. #7

    RE: [CLOSED] IE 7 - Grid Panel Row Double Click error

     Ah, I see... cheers that worked great!

Similar Threads

  1. [CLOSED] Loader double-click error
    By softmachine2011 in forum 2.x Premium Help
    Replies: 7
    Last Post: Jun 08, 2012, 12:48 PM
  2. Replies: 3
    Last Post: Mar 23, 2011, 6:32 PM
  3. Double click the row in the grid...
    By Tanielian in forum 1.x Help
    Replies: 1
    Last Post: Sep 03, 2010, 3:23 PM
  4. Replies: 2
    Last Post: May 31, 2010, 6:27 AM
  5. Hover and double-click event on Panel?
    By dbassett74 in forum 1.x Help
    Replies: 2
    Last Post: May 07, 2009, 2:58 AM

Posting Permissions