PDA

View Full Version : [CLOSED] Event order grid problem



CarWise
Dec 13, 2013, 10:07 AM
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

Daniil
Dec 13, 2013, 11:38 AM
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>

CarWise
Dec 13, 2013, 12:30 PM
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

Daniil
Dec 18, 2013, 3:54 AM
Hi Martin,

Any progress on this issue?