I've been trying to implement a RegularExpressionValidator for a textbox in my RadGrid. Edits and Inserts happen using the InPlace editor. They are not automatic, I deal with them via code. If I go into Edit Mode I cannot exit Edit Mode or do anything until I fill in the empty fields in the InPlace Editor and either use the Insert or Cancel command. Using the debugger I've determined that no postbacks happen while the grid is in edit mode and there are empty fields in the inplace editor. Not quite sure what to do, cannot find similar issues in the forums.
This is my OnDataBound event that implements the RegularExpressionValidator:
'if the grid is currently being edited
If e.Item.IsInEditMode Then
Dim eItem = TryCast(e.Item, GridEditableItem)
Dim editor = TryCast(eItem.EditManager.GetColumnEditor("rate"), GridTextBoxColumnEditor)
Dim cell = TryCast(editor.TextBoxControl.Parent, TableCell)
Dim rev = New RegularExpressionValidator()
rev.ControlToValidate = editor.TextBoxControl.ID
rev.ValidationExpression = "[0-9]*\.?[0-9]*"
rev.CssClass = "text-danger"
rev.ErrorMessage = " Please provide a valid number."
My Cancel command (which does not get executed):
ToggleCommandColumns is a custom function that swaps button visibility so it should not be affecting anything. Same goes for ToggleControlVisability, it just makes some controls visible on the page.
I only started encountering this issue when I put in a RegularExpressionValidator. If I take it out, it works fine (I can cancel the editor at any time).
Any support would be appreciated.