For Programmers: Free Programming Magazines  


Home > Archive > C# > April 2006 > Datagrid limit column to numeric input?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Datagrid limit column to numeric input?
GotDotNetNow

2006-04-11, 8:05 am

I have a windows form that contains two datagrids (framework 2.0/C#).
I would like to limit two of the columns to numeric entries only. IE
If the user types a letter or anything other than 0123456789. then I
want to supress the key.

I have tried turning on keypreview on the form (I'm using this method
to limit entries in other textboxes/controls) but this method does not
capture the keys once the datagrid goes into "edit mode".

Ideas on how to do this would be great.

Thanks
Rick

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com