gridPanel (in updatePanel) disappears after partial postback

  1. #1

    gridPanel (in updatePanel) disappears after partial postback


    I have a problem with partial postback when there is gridpanel inside updatePanel -
    I have a button in updatePanel, and when clicking on it - it calls a gridPanel (which is also in UpdatePanel). But - the gridPanel actually appears only after first page-loaded, and by clicking the button - not.

    Here is my code:

    <asp:ScriptManager ID="ScriptManager1" runat="server">
        <asp:UpdatePanel ID="uPnlBtn" runat="server">
                <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Partial Postback" />
        <br />
        <asp:UpdatePanel ID="uPnlGrid" runat="server" UpdateMode="Conditional">
                <ext:GridPanel ID="GridPanel1" runat="server" StripeRows="true" AutoHeight="true">
                        <ext:Store ID="Store1" runat="server">
                                        <ext:RecordField Name="a1" />
                                        <ext:RecordField Name="a2" />
                                        <ext:RecordField Name="a3" />
                                        <ext:RecordField Name="a4" />
                    <ColumnModel ID="ColumnModel1" runat="server">
                            <ext:Column Header="a11" DataIndex="a1">
                            <ext:Column Header="a21" DataIndex="a2">
                            <ext:Column Header="a31" DataIndex="a3">
                            <ext:Column Header="a41" DataIndex="a4">
     public partial class _Default : System.Web.UI.Page
            protected void Page_Load(object sender, EventArgs e)
            protected void Button1_Click(object sender, EventArgs e)
            private void LoadGrid()
                    DataTable dt = new DataTable();
                    for (int i = 0; i < 10; i++)
                        DataRow dr = dt.NewRow();
                        dr["a1"] = "aaa";
                        dr["a2"] = "bbb";
                        dr["a3"] = "ccc";
                        dr["a4"] = "ddd";
                    this.Store1.DataSource = dt;
    Last edited by rach; Mar 22, 2012 at 10:38 AM.

Similar Threads

  1. Replies: 0
    Last Post: Apr 18, 2012, 8:40 AM
  2. Replies: 2
    Last Post: Mar 28, 2012, 9:13 AM
  3. Partial postback
    By hardik in forum 1.x Help
    Replies: 0
    Last Post: Apr 12, 2011, 1:53 PM
  4. [CLOSED] [1.0] Formpanel with partial postback
    By betamax in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 29, 2010, 1:54 PM
  5. DateField disapears after UP partial postback
    By ljcorreia in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Aug 06, 2009, 7:07 AM

Posting Permissions