Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > How to restrict the user to enter only numeric values in a datagridview?
 

How to restrict the user to enter only numeric values in a datagridview?

Hi .Net Gurus
Our requirement is to restrict the user to enter only numeric values. Although it can be done in gid's cellValidating event but in this scenario user can enter invalid values also. I want to implemented some thing like KeyPress event so that user can be restricted right the monet he enters anything into the cell.

I saw in one of the sample(.net 2003 ver.) where this finctionality was achieved by adding tableStyle to the grid's tablestyle property but in beta2 version there is no such property.

Any idea?
Kailash-Bisht  Monday, October 17, 2005 6:41 AM
Daniel Rieck  Friday, October 21, 2005 1:53 PM
Daniel Rieck  Friday, October 21, 2005 1:53 PM

You can use google to search for other answers

Custom Search

More Threads

• Accessing the hidden column
• Linking a combobox to a remote database
• proplem when adding collection as a property to the datagridviewcomboboxcolumn
• Move data from xml document to database table
• RichTextBox control hosted in Datagridview cell - properties question
• datarows to repeat
• Highlighted rows in DataGridView
• Datagridview vs net 2005 - displayindex of columns.
• DataGrid Multi Selection Problem
• Gridview command argument of row id