This is a migrated thread and some comments may be shown as answers.

Grid autorefresh with checkbox

2 Answers 95 Views
Grid
This is a migrated thread and some comments may be shown as answers.
SURESH
Top achievements
Rank 1
SURESH asked on 05 Jan 2010, 12:58 PM
Hi
  I am using radgrid and i need to refresh grid in every 10 sec but grid should refresh only when i am selected checkbox . .....if checkedbox true means then only page should ready to refresh otherwise page would not refresh........

(Thanks)
Regards
Suresh.S

2 Answers, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 05 Jan 2010, 03:42 PM
Hello Suresh,

You could use the ASP.NET Timer control:
<asp:CheckBox ID="TimerCheckBox" runat="server" AutoPostBack="true" OnCheckedChanged="TimerCheckBox_CheckedChanged" />
<asp:Timer ID="Timer1" runat="server" Enabled="false" Interval="3000" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <telerik:RadGrid ID="RadGrid1" runat="server" ... />
    </ContentTemplate>
</asp:UpdatePanel>

protected void TimerCheckBox_CheckedChanged(object sender, EventArgs e)
{
    Timer1.Enabled = (sender as CheckBox).Checked;
}

Introduction to the Timer Control

Regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
SURESH
Top achievements
Rank 1
answered on 06 Jan 2010, 05:10 AM
Thanks for ur response
Tags
Grid
Asked by
SURESH
Top achievements
Rank 1
Answers by
Daniel
Telerik team
SURESH
Top achievements
Rank 1
Share this question
or