Telerik's RadDataGrid and Enumerations

1 posts, 0 answers
  1. Tony
    Tony avatar
    1 posts
    Member since:
    Jun 2019

    Posted 11 Jun Link to this post

    So I am having an issue with Telerik's RadDataGrid for UWP. I have a command that updates an item in the collection that is bound to the RadDataGrid. It sets 3 properties, the one I'm having issues with is an enum property; Status. The Status enumeration is used in a couple of DataTemplateSelectors and StyleSelectors. There is no column defined for the Status property. When it gets updated, an exception gets thrown:

    System.InvalidOperationException
      HResult=0x80131509
      Message=Failed to compare two elements in the array.
      Source=System.Private.CoreLib
      StackTrace:
       at System.Collections.Generic.ArraySortHelper`1.BinarySearch(T[] array, Int32 index, Int32 length, T value, IComparer`1 comparer)
       at System.Array.BinarySearch[T](T[] array, Int32 index, Int32 length, T value, IComparer`1 comparer)
       at System.Collections.Generic.List`1.BinarySearch(Int32 index, Int32 count, T item, IComparer`1 comparer)
       at Telerik.Data.Core.Group.IndexOf(Object item, IComparer`1 sortComparer)
       at Telerik.Data.Core.Engine.ParallelDataEngine.Telerik.Data.Core.Engine.IDataEngine.GetFilteredItemIndex(Object item)
       at Telerik.Data.Core.LocalDataSourceProvider.ProcessPropertyChanged(Object sender, PropertyChangedEventArgs e)
       at Telerik.Data.Core.LocalDataSourceProvider.DataView_ItemPropertyChanged(Object sender, PropertyChangedEventArgs e)
       at Telerik.Data.Core.EnumerableDataSourceView.HandlePropertyChanged(Object sender, PropertyChangedEventArgs e)
       at Telerik.Data.Core.EnumerableDataSourceView.Telerik.Core.IWeakEventListener.ReceiveEvent(Object sender, Object args)
       at Telerik.Core.WeakEventHandlerList`1.OnPropertyChanged(Object sender, PropertyChangedEventArgs e)
       at System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
       at GalaSoft.MvvmLight.ObservableObject.RaisePropertyChanged(String propertyName)
       at GalaSoft.MvvmLight.ViewModelBase.RaisePropertyChanged[T](String propertyName, T oldValue, T newValue, Boolean broadcast)
       at GalaSoft.MvvmLight.ViewModelBase.Set[T](T& field, T newValue, Boolean broadcast, String propertyName)
       at MyLineItemViewModel.set_Status(Status value) in MyLineItemViewModel.cs:line 121
     
    Inner Exception 1:
    ArgumentException: Object must be of type String.

     

    I have gone through an changed the enum property's data type to string, but I still get the same issue. For what it's worth, I am sorting the collection via PropertySortDescriptors, filtering via a DelegateFilterDescriptor, and grouping via PropertyGroupDescriptor. Does anyone have any suggestions?


Back to Top