You must Sign In to post a response.
  • Category: ASP.NET

    Auto Refresh Gridview in

    i am having a gridview , which should be auto refreshed on every 5 min or postback from other page.
  • #769294
    [Response removed by Admin. Read forum policies.]

  • #769332
    Hi Md Nadeem,

    1.) If you are binding grid in code behind , then u can use timer control of and on timer elapsed function call you can rebind the grid

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <asp:Timer ID="Timer1" runat="server" Interval="1000" OnTick="Timer1_Tick">



    protected void Timer1_Tick(object sender, EventArgs e)

    2.) If u are binding the grid on client side then u can invoke SetInetrval function and rebind the grid there.


    Anjali Bansal

    ~Give your best and lead the world

  • #769374

    <asp:ScriptManager ID="SCManager1" runat="server"></asp:ScriptManager>

    <asp:Timer ID="Time1" runat="server" Interval="500" OnTick="Timer1_TimerClick"></asp:Timer>
    <asp:UpdatePanel runat="server">
    <asp:GridView ID="Gridview1" runat="server"></asp:GridView>
    <asp:AsyncPostBackTrigger ControlID="Time1" EventName="TimerClick" />




    protected void TimerClick(object sender, EventArgs e)

    public void Gridbinding()
    sqlQuery = "SELECT * FROM Table1"
    Gridview1.DataSource = con.ReturnQuery(sqlQuery );

  • Sign In to post your comments