databinding

S

Sean

Hi all,

I have a dataSet containing a table. I want to create a Web
application with textboxes that are attached to fields in the
dataSet's table, such that data entry is filtered by the datatypes of
those fields (e.g. 'age' text box only accepts numbers because its
field is integer). Is there any way to have this form of strong
typing driven by the table's individual fields' datatypes?

thanks,
Sean
 
E

Elliot Rodriguez

At a first pass, what if you created Validator controls at runtime that
mapped to your data fields and their expected types?

You wont be able to do this "intrinsically", by that I mean expect the
boxes to accept or reject input simply based on the datatype that its
bound to. You'll have to throw Validators in somewhere along the line to
ensure expected datatypes are input.
 
S

Sean

At a first pass, what if you created Validator controls at runtime that
mapped to your data fields and their expected types?

You wont be able to do this "intrinsically", by that I mean expect the
boxes to accept or reject input simply based on the datatype that its

I was afraid of this. Thanks for the dynamic Validator idea though!

Sean
 
N

Nicole Schenk

Sean said:
Hi all,

I have a dataSet containing a table. I want to create a Web
application with textboxes that are attached to fields in the
dataSet's table, such that data entry is filtered by the datatypes of
those fields (e.g. 'age' text box only accepts numbers because its
field is integer). Is there any way to have this form of strong
typing driven by the table's individual fields' datatypes?

thanks,
Sean
There is nifty SmartDate class in Rockford Lhotka Expert C# Business Objects
that does what you want for dates. The same idea would be needed to handle
nulls for integers or floats (what is a null represented as an integer or
float is another question).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top