using System.Collections.Generic;
using System.Dynamic.Utils;
using System.Linq;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.GridView;
using Telerik.Windows.Controls.GridView.Selection;
using Telerik.Windows.Data;

namespace RadGridView_SL4_AR_12
{
	public class CustomizedFilteringControl : FilteringControl
	{
		public override void Prepare(GridViewBoundColumnBase column)
		{
			base.Prepare(column);

			var availableOperators = new List<FilterOperator>()
            {
                FilterOperator.Contains,
				FilterOperator.DoesNotContain,
				FilterOperator.StartsWith,   
				FilterOperator.EndsWith,
				FilterOperator.IsEqualTo,
				FilterOperator.IsNotEqualTo,				              
            };

			var cbo1 = this.ChildrenOfType<RadComboBox>()
			.Where(b => b.Name == "PART_Filter1ComboBox")
			.FirstOrDefault();
			cbo1.ItemsSource = availableOperators;

			var cbo2 = this.ChildrenOfType<RadComboBox>()
			.Where(b => b.Name == "PART_Filter2ComboBox")
			.FirstOrDefault();
			cbo2.ItemsSource = availableOperators;
		}
	}
}