Current .Net Version: 2.0.50727
Home
Articles
C# & .Net Framework Reference
Practice C# Online
XML Web Services
RSS Feeds
Code Snippets
T-SQL Scripts
Videos
Valuable Links
Contact Us
Mike's C#, VS.NET and SQL Blog




ROR XML Info.
Cannot enter minus sign from Numeric Key Pad in a DataGridTextBoxColumn
Author: Michael G.     Last Updated:2/15/2004 12:00:00 AM
Category(ies): Windows Forms All
Description: If you create a Windows Form with a DataGrid control with text box columns you will not be able to type in the minus sign key from the numeric key pad. Learn how to overcome this problem.
  Add & View Comments About this Article

In order to fix this problem you must defined a 'TableStyle' then 'GridColumnStyle' columns for the style for your DataSource then set the 'Multiline' property of the inherent TextBox control to 'true': // first find out the name of the DataGridTextBoxColumn control then do something like this // in your Form's Loading event handler: private void frmRundown_Dates_Load(object sender, System.EventArgs e) { // other Loading event code .... dataGridTextBoxColumnDummyControl.TextBox.Multiline = true; } And that's all there is too it! You can now press the minus sign key in the numeric key pad and it will be added to the text successfully.

Comments Click Here to Add your Comment
No Comments Found.
 
COPYRIGHT/DISCLAIMER | CONTACT US