Issue 86: Unhandled exception in DataGridViewRowCollection.RowComparer.CompareObjects

issues
Status:closed
Assigned To:Guest
Type:Defect
Area:Skyline
Priority:2
Milestone:1.2
Opened:2011-09-19 08:46 by Brendan MacLean
Changed:2012-04-18 12:04 by Brendan MacLean
Resolved:2011-09-20 09:39 by Nick Shulman
Resolution:Fixed
Closed:2012-04-18 12:04 by Brendan MacLean
2011-09-19 08:46 Brendan MacLean
Title»Unhandled exception in DataGridViewRowCollection.RowComparer.CompareObjects
Assigned To»nicksh@u.washington.edu
Type»Defect
Area»Skyline
Priority»2
Milestone»1.2
Skyline version: 1.1.1.2964
Installation ID: 2e15e4c8-99fe-44c8-b7f2-229b8c608f45
Exception type: System.ArgumentException
Error message: Object must be of type String.

Stack trace:
   at System.String.CompareTo(Object value)
   at System.Collections.Comparer.Compare(Object a, Object b)
   at System.Windows.Forms.DataGridViewRowCollection.RowComparer.CompareObjects(Object value1, Object value2, Int32 rowIndex1, Int32 rowIndex2)
   at System.Windows.Forms.DataGridViewRowCollection.RowArrayList.Pivot(Int32 left, Int32 center, Int32 right)
   at System.Windows.Forms.DataGridViewRowCollection.RowArrayList.CustomQuickSort(Int32 left, Int32 right)
   at System.Windows.Forms.DataGridViewRowCollection.RowArrayList.CustomSort(RowComparer rowComparer)
   at System.Windows.Forms.DataGridViewRowCollection.Sort(IComparer customComparer, Boolean ascending)
   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)
   at System.Windows.Forms.DataGridView.OnMouseClick(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.DataGridView.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)

2011-09-20 09:39 Nick Shulman
resolve as Fixed
Statusopen»resolved
Assigned Tonicksh@u.washington.edu»Brendan MacLean
This exception came from the way we were setting cell values to the string "#N/A" if the value was missing. What we're supposed to do is use "DefaultCellStyle.NullValue" to control the way that nulls are displayed in a grid column.

2012-04-18 12:04 Brendan MacLean
close
Statusresolved»closed
Assigned ToBrendan MacLean»Guest