Issue 258: InvalidOperationException clicking on column to sort rows in EditIrtCalcDlg.Calibrate

Status:closed
Assigned To:Guest
Type:Defect
Area:Skyline
Priority:2
Milestone:2.1
Opened:2013-08-08 13:32 by Nick Shulman
Changed:2014-01-08 12:59 by Nick Shulman
Resolved:2013-08-08 17:44 by Nick Shulman
Resolution:Fixed
Closed:2014-01-08 12:59 by Nick Shulman
2013-08-08 13:32 Nick Shulman
Title»InvalidOperationException clicking on column to sort rows in EditIrtCalcDlg.Calibrate
Assigned To»Nick Shulman
Type»Defect
Area»Skyline
Priority»2
Milestone»2.1
Exception: https://skyline.gs.washington.edu/labkey/announcements/home/issues/exceptions/thread.view?rowId=5137

Stack trace:
   at System.Windows.Forms.DataGridView.DataGridViewDataConnection.ProcessListChanged(ListChangedEventArgs e)
   at System.Windows.Forms.DataGridView.DataGridViewDataConnection.currencyManager_ListChanged(Object sender, ListChangedEventArgs e)
   at System.Windows.Forms.CurrencyManager.OnListChanged(ListChangedEventArgs e)
   at System.Windows.Forms.CurrencyManager.List_ListChanged(Object sender, ListChangedEventArgs e)
   at System.Windows.Forms.BindingSource.OnListChanged(ListChangedEventArgs e)
   at System.Windows.Forms.BindingSource.InnerList_ListChanged(Object sender, ListChangedEventArgs e)
   at System.ComponentModel.BindingList`1.OnListChanged(ListChangedEventArgs e)
   at System.ComponentModel.BindingList`1.FireListChanged(ListChangedType type, Int32 index)
   at System.ComponentModel.BindingList`1.InsertItem(Int32 index, T item)
   at System.Collections.ObjectModel.Collection`1.Add(T item)
   at System.ComponentModel.BindingList`1.AddNewCore()
   at System.ComponentModel.BindingList`1.System.ComponentModel.IBindingList.AddNew()
   at System.Windows.Forms.BindingSource.AddNew()
   at System.Windows.Forms.CurrencyManager.AddNew()
   at System.Windows.Forms.DataGridView.DataGridViewDataConnection.AddNew()
   at System.Windows.Forms.DataGridView.DataGridViewDataConnection.OnNewRowNeeded()
   at System.Windows.Forms.DataGridView.OnRowEnter(DataGridViewCell& dataGridViewCell, Int32 columnIndex, Int32 rowIndex, Boolean canCreateNewRow, Boolean validationFailureOccurred)
   at System.Windows.Forms.DataGridView.SetCurrentCellAddressCore(Int32 columnIndex, Int32 rowIndex, Boolean setAnchorCellAddress, Boolean validateCurrentCell, Boolean throughMouseClick)
   at System.Windows.Forms.DataGridView.SetAndSelectCurrentCellAddress(Int32 columnIndex, Int32 rowIndex, Boolean setAnchorCellAddress, Boolean validateCurrentCell, Boolean throughMouseClick, Boolean clearSelection, Boolean forceCurrentCellSelection)
   at System.Windows.Forms.DataGridView.SortInternal(IComparer comparer, DataGridViewColumn dataGridViewColumn, ListSortDirection direction)
   at System.Windows.Forms.DataGridView.Sort(DataGridViewColumn dataGridViewColumn, ListSortDirection direction)
   at System.Windows.Forms.DataGridView.OnColumnHeaderMouseClick(DataGridViewCellMouseEventArgs e)

When the focus gets put in the first row, the Grid wants to insert a new row, but PeptideGridViewDriver.DoCellValidating prevents that from succeeding, which eventually puts things in a state where this exception will happen. I think that the fix might have something to do with not validating until after the user has actually changed something in the row. I need to research how these DataGridView's are supposed to work with new rows.

2013-08-08 17:44 Nick Shulman
resolve as Fixed
Statusopen»resolved
Fixed in r4820. It seems that the problem was caused by changing DataGridViewCell.Value, so I changed the code to change the value directly on the list item in the datasource.

2014-01-08 12:59 Nick Shulman
close
Statusresolved»closed
Assigned ToNick Shulman»Guest