Click here to Skip to main content
15,867,453 members
Articles / Desktop Programming / Windows Forms
Article

TextBoxValidated - A .NET Windows Forms Control

Rate me:
Please Sign up or sign in to vote.
4.56/5 (11 votes)
14 Feb 2005CPOL 60.3K   687   26   9
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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Chief Technology Officer Kiefer Consulting
United States United States
Sacramento, CA based Senior .Net and SharePoint Solution Architect for Kiefer Consulting
(1-800-794-1928)
B.S. in Mathematics from UCDavis
.NET Wizard - Experts-Exchange
MCSD, MCTS: MOSS 2007 Config

Some of the bigger questions:
1. What is the meaning of my life?
To satisfy the purpose of your creator(s). (Meaning must derive from purpose. Those who create you, give you meaning.)

2. Who is my creator?
Ultimately, God is your creator. God designed and created the universe and everything in it. You and others in your life can also be a part of your creation, overriding or furthering God's purpose.

3. What is God's purpose for me?
To love and be loved by your creator and others and to enjoy the life you've been given.
This can be distinguished two ways.
a. Use your built in common sense (morality/feelings)
b. Use the creator's handbook. Fortunately our creator did not abandon us. He is with us now and even lived and died as one of us. Check out his biography in "The Bible"

Note on free-will vs. predetermination:
God exists outside the constraints of time. He exists at every point in time simultaneously and knew of your birth and every decision you will/have made. But this does not mean God predetermined any of it. Pre and post are time related concepts that do not apply to God. God always has been and always will be. He determines our universe to exist, gives it the parameters of natural law, and allows us to make our own way through it (free-will). Note that these are all present tense, it would be more appropriate to use past, present, and future tense combined. God's purpose is for us to love him and one another. But a prerequisite of love is the free-will to love. So even though God wants us to love him/others, he can not ensure it. He can, however, help us if we allow him to. A miracle is God modifying natural parameters in response to human will.

Comments and Discussions

 
GeneralDeploying the dll Pin
Jordan Walters30-Aug-06 12:04
Jordan Walters30-Aug-06 12:04 
GeneralRe: Deploying the dll Pin
Robert R Freeman1-Sep-06 9:02
Robert R Freeman1-Sep-06 9:02 
GeneralFixed Decimal Format Pin
SSTELMAR15-Jun-06 11:05
SSTELMAR15-Jun-06 11:05 
QuestionNice control..but I have a question? Pin
walnutz25-Jan-06 14:42
walnutz25-Jan-06 14:42 
AnswerRe: Nice control..but I have a question? Pin
Robert R Freeman25-Jan-06 15:15
Robert R Freeman25-Jan-06 15:15 
GeneralRe: Nice control..but I have a question? Pin
Hunter197310-Feb-06 11:01
Hunter197310-Feb-06 11:01 
AnswerRe: Nice control..but I have a question? Pin
Robert R Freeman10-Feb-06 13:05
Robert R Freeman10-Feb-06 13:05 
JokeIncredible Help Pin
Asad Naeem15-Dec-05 23:11
professionalAsad Naeem15-Dec-05 23:11 
GeneralThanks : Very useful ! Pin
kikos3122-Feb-05 20:41
kikos3122-Feb-05 20:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.