views:

149

answers:

2

This is only occurring on a user's machine, not mine. I cannot recreate this issue. Since this is occurring inside the DataGridView's internal code, I'm not quite sure how to proceed. Any ideas?

************** 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)
A: 

These questions might help:

  1. Are you and the user loading the same data?
  2. Do you see the error if you are logged on to the user's machine as you and you load the same data?
  3. Do you get the error if the user is logged on to your machine as himself and you load the same data?
  4. Do you see this error regardless of the specifics of the data you're loading into your DGV?
  5. Can you load without error the data you'd normally bind in the DGV into an in memory data structure (such as an ArrayList, DataSet, etc.)?
Jay Riggs
1.Yes2.Good idea will try3. see 24. Yes5. will tryThanks!
KClough
A: 

Turns out it was a bug in the .net framework. Updating to the latest service packs fixed the issue.

KClough