Print Page | Close Window

Tab Control Breaking Causing Validation

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=20266
Printed Date: 27 November 2024 at 1:33pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Tab Control Breaking Causing Validation
Posted By: DMoreland
Subject: Tab Control Breaking Causing Validation
Date Posted: 05 November 2012 at 11:27am
Hi,

This is related to the issue 

http://forum.codejock.com/forum_posts.asp?TID=19248&KW=&PID=66974&title=solved-groupbox-breaking-causesvalidation#66974 - http://forum.codejock.com/forum_posts.asp?TID=19248&KW=&PID=66974&title=solved-groupbox-breaking-causesvalidation#66974

If i place a user control in a tab control when i click the tab headers the validation events do not fire correctly allowing me to change tab. This happens if i host a user control inside the tab page or inside a group box in the tab page. This doesn't happen if i place the user control inside a frame on the tab page. 

When a user control is inside a group box the event order is 

TestControlGroupTab:txtData_Validate
TestControlGroupTab:UserControl_ExitFocus
TestControlGroupTab:txtData_LostFocus

When the User Control is in a frame the event order is 

TestControlFrameTab:txtData_Validate

When the user control is not in a frame or group box the event order is. 

TestControlNoParentTab:txtData_LostFocus
TestControlNoParentTab:txtData_Validate
TestControlNoParentTab:UserControl_ExitFocus
TestControlNoParentTab:UserControl_ExitFocus

I have attached an example appliction of this behaviour in action.  http://forum.codejock.com/uploads/7709/ControlValidationIssue.zip - uploads/7709/ControlValidationIssue.zip

Note. Do not click between the user controls as this will get stuck in a validation loop.
Note. The user control and app must be compiled (and run using this) to correctly highlight the issue.







Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net