One other thing, I am using EditorTemplateSelector for custom input filter such as Combobox. Every time when I define EditorTemplateSelector for individual Item, it become hardcoded. I want a generic solution. DataFilter that I am using can have any collection, so its very difficult for me handle this situation. Can you send me sample solution, where i can use generic EditorTemplateSelector.
5 Answers, 1 is accepted
The FilterDescriptors property of RadDataFilter is read-only since it is a collection property and all collection properties are read only. You add and remove elements to a collection property, you do not assign it. So you can create a FilterDescriptor and add it to the FilterDescriptors collection of RadDataFilter. Persisting a .NET such as the FilterDescriptor is beyond the scope of our support.
As for the generic solution for your second question, I am afradi that it is not possible.
All the best,
Ross
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

DataFilter.FilterDescriptors.Add(FilterDescriptor[0]);
But here is one issue, one extra and logical operator is added at the top of filter. Kindly find screen shot
Can you please attach a sample project with this behavior. We need to debug it in order to see what you are doing. Also, please explain what is the end-goal that you are after and we will try to modify the project if it is achievable.
Kind regards,
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Sorry I can't share source code but i can explain scenarios, I pass gridView.FilterDescriptors to popup screen
QueueFilter(this, gridView.FilterDescriptors as FilterDescriptorCollection);
at constructor QueueFilter I set filter to RadDAtaFilter
public QueueFilter(UserControl parent, FilterDescriptorCollection Filters)
{
InitializeComponent();
FilterDescriptor = Filters as CompositeFilterDescriptorCollection;
ItemPropertyDefinition property;
property = new ItemPropertyDefinition("request_id", typeof(string), "RequestCode");
RADDataFilter.ItemPropertyDefinitions.Add(property);
if (FilterDescriptor.Count > 0 && !FilterDescriptor[0].ToString().Equals("Empty"))
{
RADDataFilter.FilterDescriptors.Clear();
RADDataFilter.FilterDescriptors.Add(FilterDescriptor[0]);
}
at popup return i used following code.
this.DailogReturnData = RADDataFilter.FilterDescriptors;
Grid is filtered correctly, I think when i return Filter to main screen, there is some issue.

Use
RADDataFilter.FilterDescriptors.AddRange(FilterDescriptorCollection );
instead of
RADDataFilter.FilterDescriptors.Add(FilterDescriptor);