C# Source Code Viewer
View C# Source Code
Article Categories:
.Net Framework
.Net Framework 1.1
ADO.NET
ASP.NET
Assemblies
Asynchronous Methods
C#
Collections
Delegates
Events
Pocket PC
Regular Expressions
Smart Devices
SQL Server
Visual C#
Visual Studio .NET
Visual Studio .NET 2003
Windows Forms
XML
C# .Net Fun Menu
View Current Page's ASP.NET Source Code
C# Reference
C# Study Flash Cards
Valuable Links
Contact Us
Site Map
Mike's Portfolio
C# Reference Search:
Full Text Search:
Articles by Author:
Mike Gonzalez
Code Examples (zipped):
MTGUpTime.zip
ThreadLockingE...
ThreadingExamp...
RemotingExampl...
ErrorProviderE...
DelegateExampl...
CustomArrayLis...
AsynchronousEx...
C# .Net Source Code for /Articles/WindowsForms/NumericKeyMinusDataGridProblem.aspx
This ASP.NET page was written by Mike Gonzalez. <% @ Page Language="C#" Debug="True" %> <% @ Register TagPrefix="DotNetFun" TagName="Header" Src="/Header.ascx" %> <% @ Register TagPrefix="DotNetFun" TagName="Footer" Src="/Footer.ascx" %>
<%# CtrlHeader.ArticleTitle %>
<%# CtrlHeader.ArticleDescription %>
Category:
Posted
<%# CtrlHeader.AuthorDate.ToShortDateString() %>,
By
<%# CtrlHeader.AuthorName %>
" />
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.