During the CellBeginEdit event I need to supply a default value for the cell if there is no data in the cell and only during an Edit event. I initialized the default value during the CellEditorInitialized event and all works, the default value appears.
Private Sub gv_CellEditorInitialized(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCellEventArgs) Handles gv.CellEditorInitialized |
If TypeOf gv.ActiveEditor Is RadTextBoxEditor Then |
gv.ActiveEditor.Value = IIf(object.Data= 0, "",object.Data) |
End If |
End Sub |
Now when the Enter Key is pressed (accepting the default value) the CellEndEdit event is fired and I have the following code:
If IsNumeric(e.Value.ToString) Then |
object.data = e.Value |
End If |
Any help greatly appreciated.