C form validating event not firing

c form validating event not firing-18

After setting the datasource of the datagridview, it automatically jumps to the Row Validating event which I DONT WANT TO!

It first has to finish the whole function and later when the user enters with mouse or enters/leaves a row this has to be fired. Cell Border Style = Data Grid View Cell Border Style.

Hope you don't mind my second request And can you share me a link where I can find the flow of each event? May be what I want to say is not clear or not complete. (Previously, I check this duplicate check at 'Save' button click event, but my customers complain that they want to know whether it is duplicate or not after they input the ID. If I keyin some data in text Box and didn't go anywhere just directly click on Close button, it still go to Validating event which cause the message box to pop up if same ID is found in Database. So I added a flag in Textchanged event and in the Validating event I test this flag.

Cancel is set to True so that the control will not lose focus and no further events are raised. Anyway, I will clear all my coding and re code again for this form I will update it later after I finish re-code it. (This is my first time that I know I can use such features.

Hi all, Can i Know how to catch between these 2 event, Leave and Click? I will go check whether this ID is already exist in DB or not. When I click on Close button while focus is on textbox, this textbox Leave Event will trigger first before Button Click event. When the user tries to move focus from one control to another, first the system checks whether the control receiving focus causes validation. If the control passes validation then the Validated event is raised, then Leave event is raised. ) You must be doing something wrong but it's not possible to say what from your description.

Last modified 24-Dec-2017 01:55