65.9K
CodeProject is changing. Read more.
Home

TextBoxValidated - A .NET Windows Forms Control

starIconstarIconstarIconstarIcon
emptyStarIcon
starIcon

4.56/5 (10 votes)

Feb 14, 2005

CPOL
viewsIcon

61337

downloadIcon

690

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.