Standard Contains Filter instead of IsEqualTo

3 posts, 0 answers
  1. Kevin Hendriks
    Kevin Hendriks avatar
    56 posts
    Member since:
    Feb 2009

    Posted 15 Nov 2011 Link to this post

    Is it possible to set the Filter to COntains standard instead of IsEqualTo.

    I tried the following 
    <telerikData:FilterDescriptor Member="Country"
    Operator="Contains" />

    But when I then open the filter menu it is back in IsEqualTo
  2. Dimitrina
    Dimitrina avatar
    3769 posts

    Posted 16 Nov 2011 Link to this post

    Hi Kevin Hendriks,

     For the Q3 2011 version of the RadControls there is a new event of the RadGridView introduced - FilterOperatorsLoading. When subscribed to it, you could set the default operator of the filtering control. 

    private void clubsGrid_FilterOperatorsLoading(object sender, Telerik.Windows.Controls.GridView.FilterOperatorsLoadingEventArgs e)
        e.DefaultOperator = FilterOperator.Contains;

    Furthermore you could change the list of the available filter operators.

    I believe that this is what you need.

    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. smith
    smith avatar
    54 posts
    Member since:
    Mar 2009

    Posted 17 Feb 2012 Link to this post


      I am not using the Filtering Controlevent. extended  the 
    FilteringControl pls see my below code
      public CustomizedFilteringControl(GridViewColumn column)
                : base(column)
                this.Loaded += new RoutedEventHandler(CustomizedFilteringControl_Loaded); ;
            void CustomizedFilteringControl_Loaded(object sender, RoutedEventArgs e)
            public override void Prepare(GridViewColumn column)

                var cbo1 = this.ChildrenOfType<RadComboBox>().Where(b => b.Name == "PART_Filter1ComboBox").FirstOrDefault();
                cbo1.SelectedValue = FilterOperator.StartsWith;

                var cbo2 = this.ChildrenOfType<RadComboBox>().Where(b => b.Name == "PART_Filter2ComboBox").FirstOrDefault();
                cbo2.SelectedValue = FilterOperator.EndsWith;

    In XAML inside gridview Settting like
     <telerik:GridViewDataColumn Header="Aircraft" UniqueName="Aircraft" DataMemberBinding="{Binding Path=Aircraft,Mode=TwoWay,Converter={StaticResource TrimConverter}}" IsReadOnly="True">

    i cant change all the colums in each gridview nad all pages. so pls provide me the minimal change solution.
Back to Top