Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
391
12.1 manual sorting bug using groupby
posted

I've turned on manual sorting using the new Infragistics version.

The following exception got raised when binding my list to the datasource (and datacontext, etc)

Object reference not set to an instance of an object.
   at Infragistics.Windows.DataPresenter.GroupByRecord.DoesRecordMatchGroupHelper(DataRecord record, IGroupByEvaluator evaluator)
   at Infragistics.Windows.DataPresenter.GroupByRecord.DoesRecordMatchGroup(DataRecord record, Boolean recursive, IGroupByEvaluator evaluator)
   at Infragistics.Windows.DataPresenter.RecordCollectionBase.CreateGroupByRecordRecords(DataRecord[] records, Int32& startIndex, IGroupByEvaluator groupByEvaluator)
   at Infragistics.Windows.DataPresenter.RecordCollectionBase.CreateGroupByRecordsHelper(DataRecord[] records, Int32& startIndex)
   at Infragistics.Windows.DataPresenter.RecordCollectionBase.CreateGroupByRecordsHelper(DataRecord[] records, Int32& startIndex)
   at Infragistics.Windows.DataPresenter.RecordCollectionBase.CreateGroupByRecordsHelper(DataRecord[] records, Int32& startIndex)
   at Infragistics.Windows.DataPresenter.RecordCollectionBase.CreateGroupByRecordsHelper(DataRecord[] records, Int32& startIndex)
   at Infragistics.Windows.DataPresenter.RecordCollectionBase.CreateGroupByRecordsHelper(DataRecord[] records)
   at Infragistics.Windows.DataPresenter.RecordManager.VerifySort()
   at Infragistics.Windows.DataPresenter.RecordManager.OnSourceCollectionReset()
   at Infragistics.Windows.DataPresenter.RecordManager.OnSourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at Infragistics.Windows.DataPresenter.RecordManager.ProcessChangeNotification(Object sender, Object eventArgs)
   at Infragistics.Windows.DataPresenter.RecordManager.OnChangeNotification(Object sender, Object eventArgs, Boolean isReset)
   at Infragistics.Windows.DataPresenter.RecordManager.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
   at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
   at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
   at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)

The breakpoints set in the events attributes of the xamDataGrid aren't being hit.

Sorting
="dg_Sorting"
Sorted="dg_Sorted"

It happens when having SortedFields in the FieldLayout.
I know to set fields as GroupBy="True" in the FieldSortDescription, but with this exception i'm clueless.

Is there a way to fix this while having Manual Sorting set to true ?