Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

TextBoxValidated - A .NET Windows Forms Control

0.00/5 (No votes)
14 Feb 2005 1  
A textbox control that will validate against any .NET datatype. Supports databinding, max, min, and null values.

Sample Image - TextBoxValidated.jpg

Introduction

The TextBoxValidated control is a textbox specifically designed for Databinding and Data Type validation. It will automatically regect any attempt to invalidate the value. Supports any of the .NET datatypes. Includes min and max value properties and events for notifications. Also automatically handles/sets null values.

Usage

Use the setup file found in the source code's Installer/Release directory to install the control. Optionally restart your computer after installer completes to refresh your help file indexes.

Add the control to your toolbar.

Adding a control to the toolbox.

Drag the TextBoxValidated control from your toolbar onto your form.

The TextBoxValidated control in the toolbar.

Set the Validation properties.

Validation properties

If databinding, use SelectedValue instead of Text. Set the AcceptNulls property to false if you want to use empty strings rather than nulls.

Databinding properties.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here