.net 初始化组件期间引发DataGridView异常

.net 初始化组件期间引发DataGridView异常,.net,winforms,exception,datagridview,.net,Winforms,Exception,Datagridview,这只发生在用户的机器上,而不是我的机器上。我无法重现这个问题。因为这是在DataGridView的内部代码中发生的,所以我不太确定如何继续。有什么想法吗 ************** Exception Text ************** System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Param

这只发生在用户的机器上,而不是我的机器上。我无法重现这个问题。因为这是在DataGridView的内部代码中发生的,所以我不太确定如何继续。有什么想法吗

************** Exception Text **************
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.Collections.ArrayList.get_Item(Int32 index)
   at System.Windows.Forms.DataGridViewRowCollection.SharedRow(Int32 rowIndex)
   at System.Windows.Forms.DataGridViewRowCollection.get_Item(Int32 index)
   at System.Windows.Forms.DataGridView.get_Item(Int32 columnIndex, Int32 rowIndex)
   at BatchTransactionTool.TransactionPreview.grdTransaction_CellValueChanged(Object sender, DataGridViewCellEventArgs e)
   at System.Windows.Forms.DataGridView.OnCellValueChanged(DataGridViewCellEventArgs e)
   at System.Windows.Forms.DataGridView.OnCellValueChangedInternal(DataGridViewCellEventArgs e)
   at System.Windows.Forms.DataGridViewColumnHeaderCell.SetValue(Int32 rowIndex, Object value)
   at System.Windows.Forms.DataGridViewColumn.set_HeaderText(String value)
   at BatchTransactionTool.TransactionPreview.InitializeComponent()
   at BatchTransactionTool.TransactionPreview..ctor(FileInfo AutoSaveFile, BatchTransactionSummary bts, cbTeam team, List`1 transactionList, List`1 reinvestSecurities, Nullable`1 type, TransactionUnitType unit)
   at BatchTransactionTool.TransactionPreview..ctor(cbTeam team, List`1 transactionList, List`1 reinvstSecurities, TransactionType type, TransactionUnitType unit)
   at BatchTransactionTool.BatchTransactionTool.btnDisplayResults_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

原来这是.net framework中的一个bug。更新到最新的service Pack修复了此问题