D
DavidC
I have the code below that runs when a textbox in an ItemTemplate changes. My
problem is that it always updates the 1st row. How can I change the value in
DataKeys to reflect the index of the row I am on?
p.s. I am using AutoPostback and UpdatePanel. Thanks.
Protected Sub txtWeek1Units_TextChanged(ByVal sender As Object, ByVal e
As System.EventArgs)
Dim txBox As TextBox = CType(sender, TextBox)
Dim intTempID As Int32 =
Convert.ToInt32(gvTimesheetEntry.DataKeys(0).Value)
Dim dblUnits As Double = 0
If txBox.Text <> "" Then
dblUnits = Convert.ToDouble(txBox.Text)
End If
Dim lbl As Label = LblMsg
If PayrollClass.UpdateTimesheetsTemp(intTempID, dblUnits, 1) = False
Then
lbl.CssClass = "Show"
lbl.Text = "Update of temporary timesheet entry failed for Week1
Units"
Else
lbl.CssClass = "Hide"
lbl.Text = ""
End If
End Sub
problem is that it always updates the 1st row. How can I change the value in
DataKeys to reflect the index of the row I am on?
p.s. I am using AutoPostback and UpdatePanel. Thanks.
Protected Sub txtWeek1Units_TextChanged(ByVal sender As Object, ByVal e
As System.EventArgs)
Dim txBox As TextBox = CType(sender, TextBox)
Dim intTempID As Int32 =
Convert.ToInt32(gvTimesheetEntry.DataKeys(0).Value)
Dim dblUnits As Double = 0
If txBox.Text <> "" Then
dblUnits = Convert.ToDouble(txBox.Text)
End If
Dim lbl As Label = LblMsg
If PayrollClass.UpdateTimesheetsTemp(intTempID, dblUnits, 1) = False
Then
lbl.CssClass = "Show"
lbl.Text = "Update of temporary timesheet entry failed for Week1
Units"
Else
lbl.CssClass = "Hide"
lbl.Text = ""
End If
End Sub