I am trying to validate values being entered into my grid real-time in the CellEndEdit event handler. If I find that the value entered is not valid, I push a message to the user and want to fire the BeginEdit on that same field, to keep them there until they enter something valid.
I cannot kickoff the BeginEdit method successfully on the cell. Sifting through this forum, I found some "like" problems and tried implementing some suggested techniques, all with no success. Below is some sample code.
Private Sub grdMain_CellEndEdit(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCellEventArgs) Handles grdMain.CellEndEdit |
If e.Row.Cells(2).Value.ToString <> "" Then |
If e.Row.Cells(2).Value.ToString.ToUpper <> "TRUE" And e.Row.Cells(2).Value.ToString.ToUpper <> "FALSE" Then |
e.Row.Cells(2).Selected = True |
e.Row.Cells(2).CellElement.IsCurrent = True |
e.Row.Cells(2).BeginEdit() |
End If |
End If |
End Sub |
The BeginEdit does not fire, but the cell is selected in the grid.
Regards,
Christopher Thumann