I am trying to set edit back to cell if no value is entered.
I am using the validating event.
It traps the empty event nicely but when I try to move focus and edit back to the empty cell if refuses and jump to next column in same row.
My code is as follow:
I am using the validating event.
It traps the empty event nicely but when I try to move focus and edit back to the empty cell if refuses and jump to next column in same row.
My code is as follow:
'get column number |
Dim col As Int32 = Me.RadGridView1.Columns.IndexOf(Me.RadGridView1.CurrentColumn) |
'test first if valid lognumber |
If col = 0 Then |
Dim input As String = (Me.RadGridView1.ActiveEditor.Value.ToString()) |
If input = "" Then |
MsgBox("empty") |
e.Cancel = True |
Me.RadGridView1.Rows(0).IsCurrent = True |
Me.RadGridView1.Columns(0).IsCurrent = True |
Me.RadGridView1.BeginEdit() |
End If |
End If |
Thank you