Mohamed,
I have attached a copy of the sample code as requested. (Sent via email to technical support support@xceedsoft.com)
I have made a slight modification to the program, it's not the button that is playing up... As I cannot click on the winbutton unless the validation process succeeded. I do not know if there is a way out for this or not.
Anyway, I have implemented a toolstrip so that I could try to bypass the validation process and proceed with the click event of the toolstrip.
Now, the entire scenario goes like this...
I am trying to setup a inventory system where new items can be added. However, there may be certain information that are compulsary (e.g. ID of a product should not duplicate, but this is not used as the primary key).
Everything will work just fine when the user does proceed with data entry etc etc.
However, when the user accidently clicked the add new button, he could not cancel the action unless all compulsary fields have been filled in accordingly (regardless of the correctness of the data entered). At this point in time, the user is stuck.
I have tried to clear the validationerror as soon as the click event of the toolstrip is executed. But, it still proceed to the validating event of the textbox currently having focus. I tried to add e.cancel = false as suggested in the forum, but it still won't work in any way.
Any help would be appreciated.
Best regards,
James CHANG