May 13, 2011, 2:00 PM
Updating GridPanel inside UpdatePanel
Have an problems with updating grid inside UpdatePanel, I know its possible to do with JS but my goal is to initiate grid updating from server side on async postback initiated from another UpdatePanel control.
<%@ Register Assembly="Ext.Net, Version=1.0.4093.32349, Culture=neutral, PublicKeyToken=2e12ce3d0176cd87"
Namespace="Ext.Net" TagPrefix="ext" %>
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Literal ID="ltrTime" runat="server"></asp:Literal>
<ext:GridPanel ID="GridPanel1" runat="server"> .................... </ext:GridPanel>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Button ID="btnReload" runat="server" Text="Reload" OnClick="btnReload_OnClick" />
</ContentTemplate>
</asp:UpdatePanel>
protected void Page_Load(object sender, EventArgs e)
{
ltrTime.Text = DateTime.Now.ToLongTimeString();
}
protected void btnReload_OnClick(object sender, EventArgs e)
{
UpdatePanel1.Update();
}
As result Grid is disappearing after async postback. So how to do this correct ?