The method or operation is not implemented error when we set the filter to "StartsWith"

2 posts, 0 answers
  1. Alex
    Alex avatar
    6 posts
    Member since:
    Jul 2015

    Posted 13 Apr Link to this post

    Hi,

    We are using RadGridView to display data from the DataTable. In one of the column we have selected "StartsWith" has the filter. After setting the filter if we close and re open the view, we are getting the following error and the application crashes. This is once we load the layout even before Data is loaded.

     

    System.NotImplementedException: The method or operation is not implemented.
       at Telerik.Windows.Data.Expressions.FilterOperatorExpressionBuilderBase.GenerateStartsWith(Expression left, Expression right)
       at Telerik.Windows.Data.Expressions.OperatorValueFilterDescriptorExpressionBuilderBase.CreateBodyExpression()
       at Telerik.Windows.Data.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpression()
       at Telerik.Windows.Data.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpression()
       at Telerik.Windows.Data.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpression()
       at Telerik.Windows.Data.ICompositeFilterDescriptorExtensions.GetFilterFunction(ICompositeFilterDescriptor filterDescriptors, Type itemType)
       at Telerik.Windows.Data.QueryableCollectionView.InitializeInternalList(IQueryable view)
       at Telerik.Windows.Data.QueryableCollectionView.CreateInternalList()
       at Telerik.Windows.Data.QueryableCollectionView.get_InternalList()
       at Telerik.Windows.Data.QueryableCollectionView.GetEnumerator()
       at System.Linq.Enumerable.<OfTypeIterator>d__aa`1.MoveNext()
       at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
       at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)

     

    After digging through the column properties, I found out that FilterMemberType was null. Once I set the property to string type. Its not throwing error anymore.

    Please let me know is it the right way to do it or if you have any better solution.

     

    Thanks and regards,

    Alex

     

     

     

  2. Yoan
    Admin
    Yoan avatar
    1070 posts

    Posted 15 Apr Link to this post

    Hello Alex,

    Generally, when the Type of the bound property cannot be automatically discovered by the data engine, you can “help” the column by setting the FilterMemberType property. So, your approach is the correct one.

    Regards,
    Yoan
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top