We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

CurrentCellValidating

I have a question about some cell validation code I''m trying to implement. What I want to do is when the user clicks ok on the error message i want them to be able to use the arrow keys on that cell to move say to the left to fix the digit that is wrong. The way it works now is after the user clears off the error message the cell is sort of in an edit mode where it is all highlighted but if i try to use my arrow left or up or down or right it gives me the error message again. How can i make the cell so its in edit mode but not highlighted like when i start typing in the field or use a mouse click in the field so its not highlighted but in edit mode. I''m doing this in the currentcellvalidating even using the controltext value. Thanks Phil

1 Reply

AD Administrator Syncfusion Team March 19, 2004 01:37 PM UTC

Try handling CurrentCellDeactivateFailed, and simulate a click into the cell. (This would avoid worrying about exactly what kind of cell you are using.) Private Sub GridControl1_CurrentCellDeactivateFailed(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridControl1.CurrentCellDeactivateFailed Dim c As Control = Me.GridControl1.CurrentCell.Renderer.Control Syncfusion.Drawing.ActiveXSnapshot.FakeLeftMouseClick(c, New Point(1, 5)) End Sub

Loader.
Up arrow icon