Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Numeric DataGridView column
 

Numeric DataGridView column

Hi,

I have some columns on my DataGridView instance in a C# application, forcolumns which contains Numeric type (like double and decimal) I want prevent user from entering alphabetical characters in these columns( currently I check it in cellValidating and if there is alphabetical characters I set the error text in DataRow ) but I want let user just enter integers.

I’d be thankful if anybody can help me.

Thanks in advance,

Saeideh

Saeideh  Wednesday, December 20, 2006 1:52 PM
There are two ways I can think of to do this.

Use the DataGridView NumericUpDown column sample.
Use the MaskedEdit example in the datagridview samples.


Ken Tucker  Wednesday, December 20, 2006 2:07 PM
There are two ways I can think of to do this.

Use the DataGridView NumericUpDown column sample.
Use the MaskedEdit example in the datagridview samples.


Ken Tucker  Wednesday, December 20, 2006 2:07 PM

You can use google to search for other answers

Custom Search

More Threads

• DataGridView
• how to keep the leftside columns visible when the scroll bar moves in a datagrid?
• DataGridViewCheckboxColumn DbNull issue
• Auto column in datagridview in vs2005
• Pop up window
• Display a datagridview cell's long text content as a paragraph.
• DataGridView SelectionMode
• How to bind data from a ListView ctrl to Treeview ctrl?
• Accessing a ColumnName from Typed Dataset
• DataGridView in VS 2005