From: wannabe geek on
I want to know the best way to enforce data types (double, string) in a
DataGridView control. The control would be unbound and programmatically
populated. TIA.
--
Wannabe Geek
From: Jeff Johnson on
"wannabe geek" <wannabegeek(a)discussions.microsoft.com> wrote in message
news:B3A5DF7D-964C-4845-A17D-B7CDAF89FC36(a)microsoft.com...

>I want to know the best way to enforce data types (double, string) in a
> DataGridView control. The control would be unbound and programmatically
> populated. TIA.

I'd start by looking at the CellEndEdit event.


From: Jeff Johnson on
"Jeff Johnson" <i.get(a)enough.spam> wrote in message
news:%23Z5zQU75KHA.3804(a)TK2MSFTNGP05.phx.gbl...

>>I want to know the best way to enforce data types (double, string) in a
>> DataGridView control. The control would be unbound and programmatically
>> populated. TIA.
>
> I'd start by looking at the CellEndEdit event.

Actually, it looks like the CellValidating event might be an even better
choice.


From: wannabe geek on
"Jeff Johnson" wrote:

> "Jeff Johnson" <i.get(a)enough.spam> wrote in message
> news:%23Z5zQU75KHA.3804(a)TK2MSFTNGP05.phx.gbl...
>
> >>I want to know the best way to enforce data types (double, string) in a
> >> DataGridView control. The control would be unbound and programmatically
> >> populated. TIA.
> >
> > I'd start by looking at the CellEndEdit event.
>
> Actually, it looks like the CellValidating event might be an even better
> choice.
>
>
> .
>

Is there a way to get .NET to validate data based on specific types or must
i do that manually and display error messages?
--
Wannabe Geek
From: Jeff Johnson on
"wannabe geek" <wannabegeek(a)discussions.microsoft.com> wrote in message
news:BB411521-3A03-41E6-8C96-43A41EEB5029(a)microsoft.com...

>> >>I want to know the best way to enforce data types (double, string) in a
>> >> DataGridView control. The control would be unbound and
>> >> programmatically
>> >> populated. TIA.
>> >
>> > I'd start by looking at the CellEndEdit event.
>>
>> Actually, it looks like the CellValidating event might be an even better
>> choice.

> Is there a way to get .NET to validate data based on specific types or
> must
> i do that manually and display error messages?

No idea. I always handle validation manually, so I've never even tried to
see if .NET can do it for me.