Sir,
Please refer attached project.The project with one form which has one button, one text box. that button has one event ultraButton1_Click and ultraTextEditor1_Validating. Please place cursor in ultraTextEditor1 and click the Submit button. Now i get only one message "please enter Name" . But what i expect that form should display two messagebox such as "please enter Name" . and "Submit button clicked" . Why button click event not fired ? How to resolve this Problem ? . Can you give proper reply as soon as possible.
The button's Click event does not fire because by showing a MessageBox in the UltraTextEditor's Validating event, you are preventing the MouseUp from being processed by the UltraButton, and for a Click event to happen you need the MouseDown and MouseUp. I bet the same thing happens with the standard .NET TextBox and Button controls.
If you set the Cancel property of the Validating event's arguments, the cursor will stay in the UltraTextEditor when validation fails, which is the way most developers handle a failed validation.
Hi,
I can understand your comments. i attached sample project only, i have real project. while i click the save or submit button, it will be saved in Database. so i need to do in Button Click Event . i need to do some validation in some textbox validating event. so i can not do in Button' mouse up or down. Because i put cursor in one control . No validation need for that control. i try to move cursor towards Submit button, i did not click Submit button, but it will be saved automatically. i need the proper solution using Validating and click event . Can you give solution as soon as possible