ObjectListView sorting error

ObjectListView sorting error

Old forum URL: forums.lhotka.net/forums/t/7354.aspx

UserSS posted on Tuesday, July 28, 2009


We are having an issue with sorting of datagrid. The issue is with fields with data types double. If there is NULL value in database while sorting it throws an error.  This is the error:

at Csla.ObjectListView.Compare(Object valueA, Object valueB)

   at Csla.ObjectListView.CompareObject(ObjectView objectA, ObjectView objectB)

   at Csla.ObjectListView.InsertInOrder(ObjectView item, Int32 lowIndex, Int32 highIndex)

   at Csla.ObjectListView.System.ComponentModel.IBindingListView.ApplySort(ListSortDescriptionCollection sorts)

   at Csla.ObjectListView.System.ComponentModel.IBindingList.ApplySort(PropertyDescriptor property, ListSortDirection direction)

   at System.Windows.Forms.DataGridView.DataGridViewDataConnection.Sort(DataGridViewColumn dataGridViewColumn, ListSortDirection direction)

   at System.Windows.Forms.DataGridView.SortInternal(IComparer comparer, DataGridViewColumn dataGridViewColumn, ListSortDirection direction)

   at System.Windows.Forms.DataGridView.Sort(DataGridViewColumn dataGridViewColumn, ListSortDirection direction)

Any suggestions?




RockfordLhotka replied on Tuesday, July 28, 2009

I believe ObjectListView is part of CSLAcontrib, not CSLA .NET itself. Hopefully someone involved in creating that class can help you out.

Copyright (c) Marimer LLC