Datagridview cell validating e cancel

I just don't know what key code combination could direct focus to a text box control that should never receive focus since the Tab Stop property is false and there is no other code that sets focus to the textbox.Also in the docs on Key Down there is a mention of "Is Input Key" which I will have to look into.Darin *** Sent via Developersdex Yes, closing the form causes 'validating' to take place.One, remove the "control Box" from the form, so the user cant close it that the btn Cancel_Click event: Removehandeler Text Box1.validating, Addressof Text Box1_Validating -- Terry "Darin" wrote: I know that, but the problem is when the user clicks EXIT, the textbox.validating event is called BEFORE the is done, so the textbox is being validated.According to the documentation: "The cancel button for a form is the button control that is clicked whenever the user presses the ESC key." Which says to me the behavior s/b the same!For example, I have another application that uses a wedge type barcode reader.Maybe you should be using the Key Down event instead of the Key Press event.

datagridview cell validating e cancel-2

-- Al Reid "Terry" Hi Al, There is another property at the form level that affects how this stuff works - Auto Validate.

-- Al Reid Well it works for me - but one thing I left out - you need to set the cancel buttons 'causes validation' to false.

Also note that the "trick" to closing the form is not keeping a seperate "canceling" flag, but to put "e.cancel=False" in the forms closing event.

-- Terry Terry, I guess we have a similar background.

I don't do anything with the barcode data in the Key Press event.

Leave a Reply