HOW TO UPDATE DATA IN GRIDVIEW WITHOUT MANUAL REFRESH IN ASP.NET?

Total Post:183

Points:1285
 1605  View(s)
Ratings:
Rate this:

How to update data in gridview without manual refresh in asp.net?

  1. Post:412

    Points:2888
    Re: How to update data in gridview without manual refresh in asp.net?

    Hi Ankita, 


    Add the GridView and the Timer control inside an ASP.NET AJAX UpdatePanel as shown below

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
         <asp:Timer ID="Timer1" runat="server" Interval="60000" ontick="Timer1_Tick">
         </asp:Timer>
          <asp:GridView ...>
          </asp:GridView>
    </ContentTemplate>
    </asp:UpdatePanel>
    protected void Timer1_Tick(object sender, EventArgs e)
    {
         GridView1.DataBind();
    }

      Modified On Apr-04-2018 06:06:26 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!