We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Validating Form Fields

Thread ID:

Created:

Updated:

Platform:

Replies:

14704 Jun 2,2004 05:51 PM UTC Jun 8,2004 01:01 PM UTC Windows Forms 4
loading
Tags: Tools
Todd
Asked On June 2, 2004 05:51 PM UTC

My company is evaluating control suites to go with, but I''m having trouble figuring out how to validate fields using the tab control. We perform field by field validation on our screens, and we use the Validating event of each control to perform this validation. While switching tabs, we also check if data has changed and prompt the user before switching tabs, "Do you want to save changes?” Now if the user doesn''t want to save changes, then there is no need to validate and we switch tabs without performing validation. To make this work with the standard .Net controls, we trap a windows message that gets sent when the user clicks on a new tab. This message is sent before the Validating event fires. Then in the validating event we postpone validation until after the user answers yes. If the user answers no we just switch tabs. But with the Syncfusion tab control, I don’t know how to make this work. The SelectedIndexChanging event fires after the textbox control Validating event. Is there a property of the Syncfusion tab control that indicates it’s about to change that I can access in the textbox control Validating event? Basically how can I get the functionality I want? Thanks in advance, Todd

Administrator [Syncfusion]
Replied On June 3, 2004 01:07 AM UTC

Hi Todd, Thanks for your feedback on this issue. I have tested this here, and could see that the TextBox''s Validating event is fired before the TabControlAdv''s SelectedIndexChanging event. Hence this is event is not suitable for validation purposes. I have contacted the folks at the development team for their assistance in this regard and will update you as soon as possible. We appreciate your patience and cooperation. Regards, Guru Patwal Syncfusion, Inc.

Administrator [Syncfusion]
Replied On June 3, 2004 09:20 PM UTC

Hi Todd, You could try the TabPageAdv''s Validating event for this purpose. Let me know if this works for you. Regards, Guru Patwal Syncfusion, Inc.

Todd
Replied On June 3, 2004 10:04 PM UTC

Patwal, Well TabPageAdv''s Validating event fires after the textbox control''s Validating event, so I''m still not clear how to perform field by field validation and allow the user to switch tabs gracefully as described above. With your understanding of the TabControlAdv, is the functionality I want possible? I appreciate your time, and we do like your grid controls. Todd

Administrator [Syncfusion]
Replied On June 8, 2004 01:01 PM UTC

Hi Todd, Please refer to the sample attached. The first tabpage has username and password TextBoxes. Only after validating the entries in the TextBoxes (i.e., authenticating the user) will the TabControl allow the user to switch tabs. This check is performed within the first tabpage''s Validating event handler. Let me know if this helps. We appreciate your interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;