Filtering an Int data type throws exception

3 posts, 0 answers
  1. Sanket Singhvi
    Sanket Singhvi avatar
    20 posts
    Member since:
    May 2010

    Posted 22 Jul 2011 Link to this post


    We have implemented searching mechanism for RadGridView. It works fine when all the columns in Grid are of String type. 
    But in one of the grid I have Int columns.

    I figured out the problem. Currently my FilterOperator is "FilterOperator.Contains" and then it throws error "The method or operation is not implemented." for int column. If I changed FilterOperator to IsEqualTo it works great. But why can't I have FilterOperator.Contains for Int as well? I wish if it could do that.

  2. Rossen Hristov
    Rossen Hristov avatar
    2478 posts

    Posted 24 Jul 2011 Link to this post

    Hi Sanket Singhvi,

    The Contains filter operator will call the Contains method of the string class. There is no Contains method defined for the Int32 class, so you can't have Contains when you are filtering on Int32. Besides, what does Contains mean when you have numbers -- this is a string operation, not numerical.

    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. DevCraft R3 2016 release webinar banner
  4. christine
    christine avatar
    17 posts
    Member since:
    Jul 2010

    Posted 28 Sep 2011 Link to this post

    disregard previous post.
Back to Top