[CLOSED] Event order grid problem

  1. #1

    [CLOSED] Event order grid problem

    Hi,

    Having an enoying problem. Hope you understand without sending the full code. It's a large piece of code with external references.

    I''m using the Select Listener to update another grid with data. Like this:

    <SelectionModel>
            <ext:RowSelectionModel ID="rsmIssues" runat="server" Mode="Single">
                         <Listeners>
                               <Select Handler="if (#{pnlSouth}.isVisible()) {#{strIssueRows}.reload();}"
                                            Buffer="250"/>
                      </Listeners>
             </ext:RowSelectionModel>
    </SelectionModel>
    On the same Grid I'm using the celDblClick listener to open another window to change the details of that specific row.

    <CellDblClick Handler="loadEditWindow(record.data.ID)"/>
    The problem is that the CellDblClick listeners isn't triggered before the Select Listener is finished. So, I can't doubleclick a Cell before the binding of the other grid is finished.

    I hope you understand. Any way to make this working without having to wait till the select handler is finished ?

    Martin
    Last edited by Daniil; Dec 24, 2013 at 8:27 AM. Reason: [CLOSED]
  2. #2
    Hi Martin,

    I am not sure I understand the problem well, but, seems, I cannot reproduce it with the test case below.

    The CellDblClick listener appears not to wait the Select listener, it even fires before.

    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[] { "test", "test" },
                    new object[] { "test", "test" },
                    new object[] { "test", "test" }
                };
            }
        }
    </script>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:GridPanel ID="GridPanel1" runat="server">
                <Store>
                    <ext:Store runat="server">
                        <Model>
                            <ext:Model runat="server">
                                <Fields>
                                    <ext:ModelField Name="test1" />
                                    <ext:ModelField Name="test2" />
                                </Fields>
                            </ext:Model>
                        </Model>
                    </ext:Store>
                </Store>
                <ColumnModel runat="server">
                    <Columns>
                        <ext:Column runat="server" Text="Test 1" DataIndex="test1" />
                        <ext:Column runat="server" Text="Test 2" DataIndex="test2" />
                    </Columns>
                </ColumnModel>
                <SelectionModel>
                    <ext:RowSelectionModel runat="server" Mode="Single">
                        <Listeners>
                            <Select Handler="console.log('Select');" Buffer="250" />
                        </Listeners>
                    </ext:RowSelectionModel>
                </SelectionModel>
                <Listeners>
                    <CellDblClick Handler="console.log('celldoubleclick');" />
                </Listeners>
            </ext:GridPanel>
        </form>
    </body>
    </html>
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi Martin,

    I am not sure I understand the problem well, but, seems, I cannot reproduce it with the test case below.

    The CellDblClick listener appears not to wait the Select listener, it even fires before.

    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[] { "test", "test" },
                    new object[] { "test", "test" },
                    new object[] { "test", "test" }
                };
            }
        }
    </script>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:GridPanel ID="GridPanel1" runat="server">
                <Store>
                    <ext:Store runat="server">
                        <Model>
                            <ext:Model runat="server">
                                <Fields>
                                    <ext:ModelField Name="test1" />
                                    <ext:ModelField Name="test2" />
                                </Fields>
                            </ext:Model>
                        </Model>
                    </ext:Store>
                </Store>
                <ColumnModel runat="server">
                    <Columns>
                        <ext:Column runat="server" Text="Test 1" DataIndex="test1" />
                        <ext:Column runat="server" Text="Test 2" DataIndex="test2" />
                    </Columns>
                </ColumnModel>
                <SelectionModel>
                    <ext:RowSelectionModel runat="server" Mode="Single">
                        <Listeners>
                            <Select Handler="console.log('Select');" Buffer="250" />
                        </Listeners>
                    </ext:RowSelectionModel>
                </SelectionModel>
                <Listeners>
                    <CellDblClick Handler="console.log('celldoubleclick');" />
                </Listeners>
            </ext:GridPanel>
        </form>
    </body>
    </html>
    Thanks Daniiil,

    This is a similar code that i use, with the exception that my select LIsterner triggers a somewhat heavier code. It reloads a store and refills another grid with another data.

    As I said...it's difficult to reproduces here.

    I will look further into the problem. Maybe it lies somewhere else.

    Thanks for looking..

    Martin
  4. #4
    Hi Martin,

    Any progress on this issue?

Similar Threads

  1. [CLOSED] Order GridPanel Groups in an arbitrary order?
    By dmoore in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 27, 2013, 4:35 AM
  2. [CLOSED] Problem with order of items in Grid to Tree
    By skisly in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Feb 01, 2012, 5:20 PM
  3. [CLOSED] Problem with order of items in Grid to Tree
    By skisly in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jan 25, 2012, 9:55 PM
  4. [1.0] Rendering order causes problem
    By thchuong in forum 1.x Help
    Replies: 4
    Last Post: Jun 23, 2010, 1:19 AM
  5. [CLOSED] radio group event order
    By alexp in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 25, 2009, 12:32 PM

Posting Permissions