Article ID: 321556 - Last Review: April 7, 2006 - Revision: 3.0 FIX: You receive a System.ArgumentOutOfRangeException when you double-click a row divider in a DataGrid control that contains empty cellsThis article was previously published under Q321556 SYMPTOMS When you double-click a row divider in a DataGrid control in a Visual Studio .NET Windows application that uses the
.NET common language runtime, if the cells of the DataGrid are empty, you receive the following error message:
System.ArgumentOutOfRangeException: Index was out of
range. Must be non-negative and less than the size of the collection. Parameter name: startIndex at System.Globalization.CompareInfo.IndexOf(String source, String value, Int32 startIndex) at System.Windows.Forms.DataGridTextBoxColumn.GetPreferredHeight(Graphics g, Object value) at System.Windows.Forms.DataGrid.RowAutoResize(Int32 row) at System.Windows.Forms.DataGrid.OnMouseDown(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseDown(Message m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message m) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) CAUSE This problem occurs because of a bug in the .NET Windows
Forms classes. RESOLUTIONTo resolve this problem, obtain the
latest service pack for Microsoft .NET Framework. For additional information,
click the following article number to view the article in the Microsoft
Knowledge Base: 318836
(http://support.microsoft.com/kb/318836/EN-US/
)
INFO: How to Obtain the Latest .NET Framework Service Pack
The English version of this fix has the file
attributes (or later) that are listed in the following table. The dates and
times for these files are listed in coordinated universal time (UTC). When you
view the file information, it is converted to local time. To find the
difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel. Date Time Version Size File Name ------------------------------------------------------------------------ 23-Apr-2002 19:11:46 1.0.3705.264 1,982,464 System.Windows.Forms.dll 23-Apr-2002 7:32:48 1.0.3705.264 57,344 System.Windows.Forms.tlb 23-Apr-2002 7:38:06 16,644 System.Windows.Forms.ldo STATUSMicrosoft
has confirmed that this is a problem in the Microsoft products that are listed
at the beginning of this article.
This problem was first corrected in Microsoft .NET
Framework Service Pack 2 (SP2). APPLIES TO
| Article Translations
|
Back to the top
