Skip to content

Instantly share code, notes, and snippets.

Created September 17, 2014 03:53
Show Gist options
  • Save anonymous/0432fab645166b52eedb to your computer and use it in GitHub Desktop.
Save anonymous/0432fab645166b52eedb to your computer and use it in GitHub Desktop.
Protected Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
For i As Integer = 0 To RadGrid2.Items.Count - 1
Dim lbltime As Label = RadGrid2.Items.Item(i).FindControl("lblTime")
' Dim lbltime1 As Label = RadGrid2.Items.Item(i).FindControl("label3")
If Val(lbltime.Text) > 0 Then
StartTime = DateTime.Now.AddMinutes(lbltime.Text).ToString("HH:mm:ss").ToString
CurrentTime = StartTime.ToString
If IsPostBack Then
' StartTime = DateTime.Now.AddMinutes(lbltime.Text).ToString("HH:mm:ss")
' CurrentTime = StartTime
'Else
CurrentTime = StartTime.AddSeconds(-1).ToString
End If
lbltime.Text = CurrentTime.ToString("HH:mm:ss").ToString
End If
Next
RadGrid2.Rebind()
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment