Contains filter is working as Startswith filter

5 posts, 0 answers
  1. Xorv
    Xorv avatar
    19 posts
    Member since:
    Jan 2012

    Posted 06 Nov 2012 Link to this post

    Hi ,
    I've a radgrid with many text data (ex. tommy, motomb). Now I also have fiter option for that grid.
    Now in the filter text-box of the grid, if I type "tom" and select the filter as "Contains", the grid give the filter results as "tommy" only. Not both "tommy and "motumb".
    Why this un-expected behaviour. Even when I have setup the required correctly??

    Please guide.

    Thanks

    Edit: Corrected the word "mutumb" to "mutomb".
  2. Casey
    Casey avatar
    299 posts
    Member since:
    Jul 2009

    Posted 06 Nov 2012 Link to this post

    Hi Xorv,

    From the example, that is the expected behavior for the contains filter. The string "tom" only exists in the first example, "tommy". 

    "motumb" isn't returned because the grid is trying to search the text data to see if that exact string exists in it, and "tom" does not exist in "motumb". 

    I hope this helps.

    Casey
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Xorv
    Xorv avatar
    19 posts
    Member since:
    Jan 2012

    Posted 07 Nov 2012 Link to this post

    Hi Casey,

    the word I used "mutumb" is incorrect. The correct and actual word is "mutomb". I have edited my question accordingly.
    So, please throw some light on this.
  5. Casey
    Casey avatar
    299 posts
    Member since:
    Jul 2009

    Posted 07 Nov 2012 Link to this post

    Xorv,

    I'm not sure why the contains filter would exclude "mutomb". The only thing I can think of off of the top of my head would be if the text data was upper case for "mutomb" and lower case for "tommy" and the GroupingSettings-CaseSensitive property of the RadGrid hasn't been set to false. If the two words are the same case, or you have set that property to false, I'm not quite sure why the other value would be excluded.

    Casey
  6. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 09 Nov 2012 Link to this post

    Hi,

    I tried to reproduce the described issue but to no avail. I am sending you a simple example, please check it out and let me know what differs in your case.

    Looking forward for your reply.

    Regards,
    Radoslav
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017