Set default filter to remove all

2 posts, 0 answers
  1. Rob
    Rob avatar
    23 posts
    Member since:
    Feb 2012

    Posted 12 Jun 2015 Link to this post

    I'm trying to programmatically achieve filtering out of empty strings in a column.

     I.e. I wish to automatically set up the second grid in my attached image.

     I've tried:

     

                suffixFilter.DistinctFilter.RemoveDistinctValue("");
                suffixFilter.DistinctFilter.RemoveDistinctValue(".");
                suffixFilter.DistinctFilter.RemoveDistinctValue(string.Empty);

     

    and also:

     

                suffixFilter.FieldFilter.Filter1.Operator = FilterOperator.Contains;
                suffixFilter.FieldFilter.Filter1.Value = ".";

     

    but these only achieve the first grid. Please help!

     

    Many thanks,

     

    R

  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 15 Jun 2015 Link to this post

    Hi,

    Looking at the image attached, it is not clear which is first and which second RadGridView.
    You say the code (invoked for suffixFilter) just affects first grid. Would you please share how have you accessed the instance of suffixFilter, does it relate to the second RadGridView at all?

    Basically, in order to clear all filters associated with a specific column, you need to call:

    column.ClearFilters();

    You can additionally refer to the online documentation where the filtering is explained in details.

    Regards,
    Dimitrina
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top