Data Validation

Giganews Newsgroups
Subject: Data Validation
Posted by:  Roger Haar (ha…@physics.arizona.edu)
Date: Tue, 03 Jan 2006

Happy New Year,

    Please forgive me if I am a bit slow.  I write
one or two modest programs per year.
(Delphi 5.0.) Often I face a problem of validating
data entry.  It seems to me that what I want to do
is basic enough that I keep thinking I have just
missed it somewhere in the mountain of
capabilities.

    For example:
1. I have some data in a StringGrid,
2. I would like to use inplace editing, and
3. Valid datum for column # 1 is 'A','B','C', or
'N'.
Is there a simple way limit the input to valid
values?
    
    Or should I try to kluge this with my antique
Turbo pascal code?  Although it is not clear to me
where to insert the input testing.  I currently
open a form with a radiobutton group and thus
limit the inputs, but this starts to be a lot of
window openning and closing.

    Similarly for Columns 2-5 valid data is the
string representation of integers from -99 to 99.
Any thoughts?

Many Thanks
Roger Haar, U of AZ

Replies