I am placing the grid control in edit mode by executing the following code on a button click:
Protected Sub btnFollowupEdit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnFollowupEdit.Click
Me.btnFollowupCancel.Visible = True
Me.btnFollowupEdit.Visible = False
Me.btnFollowupSave.Enabled = True
For Each item As GridItem In radgFollowUp.MasterTableView.Items
If TypeOf item Is GridEditableItem Then
Dim editableItem As GridEditableItem = CType(item, GridDataItem)
editableItem.Edit = True
End If
Next
radgFollowUp.Rebind()
End Sub
This works correctly.
When clicking a button to save the edited values in the grid I execute the following code:
Protected Sub btnFollowupSave_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnFollowupSave.Click
For Each editedItem As GridEditableItem In radgFollowUp.EditItems
If TypeOf editedItem Is GridEditableItem Then
Dim theItem As GridEditableItem = CType(editedItem, GridEditableItem)
Dim newValues As New Hashtable()
'The GridTableView will fill the values from all editable columns in the hash
theItem.OwnerTableView.ExtractValuesFromItem(newValues, theItem)
'***
'The newValues hashtable contains the original values for the editable controls, not the changed values
' ... do stuff here to save the data
End If
Next
end sub
Can anyone tell me how to access the new(changed) values for the edited controls. I may have a cast wrong since I have a different event argument from the examples I have found.
Thanks for your help ,
John