I am using the client side delete function on a rad grid that contains rows which include textboxes (contained in a GridTemplateColumn)
The client side function works fine, but when I try to access the current values in the textboxes after deleting a row, I am getting the original value, not the new value that is currently in the text box.
If I don't delete a row first, the correct value is read.
When the save button is clicked, this is run:
The client side function works fine, but when I try to access the current values in the textboxes after deleting a row, I am getting the original value, not the new value that is currently in the text box.
If I don't delete a row first, the correct value is read.
When the save button is clicked, this is run:
For Each itm As GridDataItem In rgIntervalSetup.Items
If TypeOf itm Is GridDataItem Then
Dim theID As String = itm("RecordID").Text
Dim updatedItem As GridDataItem = CType(rgIntervalSetup.MasterTableView.FindItemByKeyValue("RecordID", Integer.Parse(theID)), GridDataItem)
UpdateValues(updatedItem, False)
End If
Next
Protected Sub UpdateValues(ByVal updatedItem As GridDataItem, ByVal KeepAsTempInterval As Boolean)
Dim txtBox As TextBox = CType(updatedItem.FindControl("txtGridIntervalName"), TextBox)
Dim IntervalName As String = txtBox.Text
Dim txtDateBox As RadDateInput = CType(updatedItem.FindControl("txtGridStartDate"), RadDateInput)
'txtBox = CType(updatedItem.FindControl("txtGridStartDate"), TextBox)
Dim IntervalStartDate As DateTime = txtDateBox.SelectedDate
Dim theID As Integer = updatedItem.GetDataKeyValue("RecordID").ToString()
Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(MyBase.Location.ConnectionString, _
CommandType.StoredProcedure, _
"EVAL2_SessionIntervalUpdate", _
New SqlClient.SqlParameter("@SessionIntervalID", theID), _
New SqlClient.SqlParameter("@IntervalName", IntervalName), _
New SqlClient.SqlParameter("@IntervalStartDate", IntervalStartDate.ToUsString), _
New SqlClient.SqlParameter("@SessionID", mySession.ID))
End Sub