how to validate textfields tied into a database? Note: Dotnet newbyso be forewarned ;)

  • Thread starter Thread starter Chris Lee
  • Start date Start date
C

Chris Lee

Hi All,

I'm new to dotnet so bear with me if this question has been asked a
zillion times (I searched for any assistance but may not have been using
the correct jargon). Here's the scenairo: we're migrating from an old
java app to a new c#-based app. One of the spiffy features of the old
app was a modified textfield class (called validatedField). It was tied
into the database such that I could create a personField (instance of
validatedField) that would tie into the person table. So, if a user
typed in Joh Ker, it would try to match up with those values and either
put the result back in the field (if only 1 match) or open up a dialog
window with a listing of persons to choose from or report back in red
text (implying no matches). In essence, it was a cool lookup textfield.
In C#, I've seen where folks have used comboboxes and textfields to
mimic something similar to this but wanted to know if there's examples
in C# of what I've done in Java and if not, what terms should I be
searching on to find out all the info that I need. Remove the spam tag
to reply to my address.

Thanks and have a great day!

chris
(e-mail address removed)
 
Hey Chris,

First of all from an end-user perspective a combo box(preferably with
autocomplete features) is the preferred windows solution. But if you really
want to implement the textfield, then you will have to dervice your own
class from TextBox class and implement the functionality into this class.
Look at these classes for more info Binding,
BindingManagerBase,CurrencyManager,PropertyManager,BindingContext.
 
Back
Top