This is a migrated thread and some comments may be shown as answers.

Setting the Comparator?

2 Answers 44 Views
DataFilter
This is a migrated thread and some comments may be shown as answers.
Phone
Top achievements
Rank 1
Phone asked on 12 Oct 2011, 07:02 PM
Hello,

I am working on a RadDataFilter that looks like the following:
<templates:RuleEditorTemplateSelector x:Key="myEditorTemplate">
  <templates:RuleEditorTemplateSelector.EditorTemplateRules>
    <templates:RuleEditorTemplateRule PropertyName="Priority" DataTemplate="{StaticResource priorityTemplate}" />
    <templates:RuleEditorTemplateRule PropertyName="Location" DataTemplate="{StaticResource locationTemplate}" />
    <templates:RuleEditorTemplateRule PropertyName="TypeName" DataTemplate="{StaticResource typeTemplate}" />
  </templates:RuleEditorTemplateSelector.EditorTemplateRules>
</templates:RuleEditorTemplateSelector>       
..
<telerik:RadDataFilter x:Name="myFilter" Source="{Binding Path=Items}"
  AutoGenerateItemPropertyDefinitions="False" EditorTemplateSelector="{StaticResource myEditorTemplate}">
  <telerik:RadDataFilter.ItemPropertyDefinitions>
    <dataFilter:ItemPropertyDefinition PropertyName="Priority" PropertyType="{Binding Int32}" DisplayName="Priority" />
    <dataFilter:ItemPropertyDefinition PropertyName="Location" PropertyType="{Binding}" DisplayName="Location" />
    <dataFilter:ItemPropertyDefinition PropertyName="TypeName" PropertyType="{Binding Int32}" DisplayName="Type" />
   </telerik:RadDataFilter.ItemPropertyDefinitions>
</telerik:RadDataFilter>

My problem is, the comparison drop down list is always empty. I'm referring to the list that says "Is equal to", "Is not equal to", etc. My question is, why is the list empty? Also, is there a way to specify which of the items in the list are available?

Thank you!

2 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 13 Oct 2011, 09:37 AM
Hi Phone,

Could you please send us a small sample project that reproduces the behavior that you are faced with.

Thank you.

Kind regards,
Ross
the Telerik team

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

0
Phone
Top achievements
Rank 1
answered on 13 Oct 2011, 08:47 PM
Well, I think I figured it out. The problem seemed to be happening when I was setting the ItemPropertyDefinition elements in markup. Everything worked fine once I moved it into the code-behind.

Thanks!
Tags
DataFilter
Asked by
Phone
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Phone
Top achievements
Rank 1
Share this question
or