Oct 11, 2012, 8:59 AM
[CLOSED] Grid store bound to list
Hello all,
I have a question about the old coolite (unfortunately I am supporting an application which we didn't have time to upgrade yet).
I hope there are still people around who can answer this :)
I need to input data from a list into a grid. The grid will get refreshed when a button is pressed. What I have defined so far is:
The store
The Button:
where
Now, the problem is that I don't get any data. When debugging I see the selection working fine, the list is correct, but it never gets to the grid.
I have a question about the old coolite (unfortunately I am supporting an application which we didn't have time to upgrade yet).
I hope there are still people around who can answer this :)
I need to input data from a list into a grid. The grid will get refreshed when a button is pressed. What I have defined so far is:
The store
<ext:Store ID="SearchStore" runat="server">
<Proxy>
<ext:DataSourceProxy />
</Proxy>
<Reader>
<ext:ArrayReader ReaderID="HistoryID">
<Fields>
<ext:RecordField Name="HistoryID" Type="Int" />
<ext:RecordField Name="ID" />
<ext:RecordField Name="LogDate" Type="Date" />
</Fields>
</ext:ArrayReader>
</Reader>
</ext:Store>
The grid: <ext:GridPanel ID="gridCustomerEmailsList" runat="server" StoreID="SearchStore" Border="false">
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:Column ColumnID="ID" DataIndex="HistoryID" Header="#ID#" />
<ext:Column ColumnID="Date" DataIndex="LogDate" Header="#Date#" />
<ext:Column ColumnID="Subject" DataIndex="ID" Header="#Subject#" />
<ext:Column ColumnID="Status" DataIndex="ID" Header="#Status#" />
</Columns>
</ColumnModel>
<LoadMask ShowMask="true" />
</ext:GridPanel>
The Button:
<ext:Button ID="btnSearch" runat="server" Text="#Search#" Icon="Magnifier" CausesValidation="true" Type="Submit"> <AjaxEvents>
<Click OnEvent="btnSearch_Click" />
</AjaxEvents>
</ext:Button>
The button event: protected void btnSearch_Click(object sender, EventArgs e)
{
DoSearch(tfCustomerID.Value.ToString().Trim());
}
And the methods used to get data: public void DoSearch(string customerID)
{
SearchStore.DataSource = DB.EmailJob.GetMailHistoryByCustomer(customerID);
SearchStore.DataBind();
}
where
DB.EmailJob.GetMailHistoryByCustomer
returns a generic list of an interface that contains the above defined propertiesNow, the problem is that I don't get any data. When debugging I see the selection working fine, the list is correct, but it never gets to the grid.
Last edited by Daniil; Oct 15, 2012 at 5:54 PM.
Reason: [CLOSED]