Hi,
i am trying to have a gridview and in one of the columns to a countdown using an updatepanel, timer and a simple function that does a simple timespan of a value passing thru the gridview
i can get it work but how can i get each gridrow to show its own unique countdown, because right it keeps over writing to one
HELP!!!
I am pasting the code below
<
asp:GridView ID="myGV" runat="server" AutoGenerateColumns="false"><Columns>
<
asp:TemplateField HeaderText="Countdown">
<
ItemTemplate>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate><asp:Label ID="lblTime" runat="server" Text='<%#Eval("Value") %>' Visible="false" />
<%
=CountDown(lblTime.Text)%>
<asp:Timer Interval="1000" ID="timer1" runat="server" /></ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="timer1" EventName="Tick" />
</Triggers>
</asp:UpdatePanel></ItemTemplate>
</
asp:TemplateField>
<
asp:BoundField DataField="Value" HeaderText="Passing Value" /> </Columns>
</
asp:GridView>
Public Function CountDown(ByVal DueDate As String) As String
Dim dLast As DateTime = CDate(DueDate)
Dim dNow As DateTime = NowDim iTime As TimeSpan = dLast.Subtract(dNow)
Return Format(iTime.TotalHours, "00") & ":" & Format(iTime.Minutes, "00") & ":" & Format(iTime.Seconds, "00")
End Function