Mar 26, 2009, 11:50 AM
[CLOSED] Refreshing on GridPanel not working
I have a GridPanel demonstrating the Clients Infos below:
The "Store_Refresh" method is:
Would you please help me?
<ext:GridPanel ID="GridPanel4" runat="server" StoreID="Store4" Border="false">
<ColumnModel ID="ColumnModel4" runat="server">
<Columns>
<ext:Column ColumnID="Id" Header="ID" Sortable="true" DataIndex="Id" Width="60" />
<ext:Column Header="Name" Sortable="true" DataIndex="Name" Width="100">
</ext:Column>
<ext:Column Header="Phone" Sortable="true" DataIndex="Phone" Width="120">
</ext:Column>
<ext:Column Header="Email" Sortable="true" DataIndex="Email" Width="120">
</ext:Column>
<ext:Column Header="Address" Sortable="true" DataIndex="Addr" Width="140">
</ext:Column>
<ext:Column DataIndex="Remark" Sortable="true" MenuDisabled="true" Header="Remark" Width="140">
</ext:Column>
</Columns>
</ColumnModel>
<BottomBar>
<ext:PagingToolBar ID="PagingToolBar3" runat="server" PageSize="10" StoreID="Store4" />
</BottomBar>
</ext:GridPanel>
And a Store4 bind to it like this: <ext:Store ID="Store4" runat="server" AutoLoad="true" OnRefreshData="Store4_Refresh">
<Reader>
<ext:JsonReader>
<Fields>
<ext:RecordField Name="Id" />
<ext:RecordField Name="Name" />
<ext:RecordField Name="Addr" />
<ext:RecordField Name="Email" />
<ext:RecordField Name="Phone" />
<ext:RecordField Name="Remark" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
By pressing a "search" btn, the records in the grid panel are refreshed. Now I want to reload the gridpanel with all records just like it was loaded at the very beginning.The "Store_Refresh" method is:
protected void Store4_Refresh(object sender, StoreRefreshDataEventArgs e)
{
ClientAccess ca = new ClientAccess();
List<ClientOb> clintList = ca.GetAllClients();
Store4.DataSource = clintList;
Store4.DataBind();
}
But it was not working, donno why?Would you please help me?
Last edited by Daniil; Nov 01, 2010 at 7:27 PM.
Reason: [CLOSED]