From: wannabe geek on 29 Apr 2010 11:09 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 29 Apr 2010 12:00 "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 29 Apr 2010 12:06 "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 29 Apr 2010 12:46 "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 29 Apr 2010 13:45 "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.
|
Next
|
Last
Pages: 1 2 Prev: Calling unmanaged Win32 API from managed code Next: calling unmanaged Windows APi |