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

Custom Member Selector

4 Answers 85 Views
DataFilter
This is a migrated thread and some comments may be shown as answers.
NOC NOC
Top achievements
Rank 1
NOC NOC asked on 31 Aug 2010, 12:16 PM
Hi,

I would like to build my own member selector using an editable combobox and an autocompletion behaviour.

Is this possible?

4 Answers, 1 is accepted

Sort by
0
Accepted
Rossen Hristov
Telerik team
answered on 31 Aug 2010, 12:39 PM
Hello NOC NOC,

We have a similar feature request. It is more general than your require, but I think that it covers your need as well. Vote for it here if you want to raise its priority.

All the best,
Ross
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Daniela
Top achievements
Rank 1
answered on 08 Nov 2013, 08:14 AM
Hi!
Is there an update on this?
Our customer wants to have a typeAHeadCombobox instead of a Combobox as Member Drop down.
0
crowmw
Top achievements
Rank 1
answered on 23 Jun 2016, 09:05 AM

Is there any updates since 2010?

 

0
Dilyan Traykov
Telerik team
answered on 24 Jun 2016, 11:02 AM
Hello,

In order to achieve the desired behavior, you can predefine the control template of the FilterControl element and set the IsEditable property of the PART_SimpleFilterMemberComboBox RadComboBox to True.

Here's the extracted style for the Windows8 theme:

<Style TargetType="{x:Type DataFilter:FilterControl}" BasedOn="{StaticResource FilterControlStyle}">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="{x:Type DataFilter:FilterControl}">
                <Border x:Name="OuterBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                    <StackPanel Orientation="Horizontal">
                        <telerik:RadButton x:Name="PART_RemoveFilterButton" Command="{Binding RemoveFilter}" Style="{StaticResource RemoveFilterButtonStyle}"/>
                        <StackPanel Orientation="Horizontal" Visibility="{Binding IsComposite, Converter={StaticResource BooleanToVisibilityConverter}}">
                            <telerik:RadToggleButton
                Name="PART_CompositeFilterLogicalOperatorToggleButton"
                Style="{StaticResource ToggleFilterButtonStyle}"
                IsChecked="{Binding CompositeFilter.LogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToCheckedConverter}}"
                Content="{Binding CompositeFilter.LogicalOperator, Converter={StaticResource LogicalOperatorConverter}}"/>
                            <telerik:RadButton x:Name="PART_AddFilterButton" Command="{Binding AddFilter}" Style="{StaticResource AddFilterButtonStyle}"/>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal" Visibility="{Binding IsComposite, Converter={StaticResource InvertedBooleanToVisibilityConverter}}">
                            <telerik:RadComboBox
                Name="PART_SimpleFilterMemberComboBox"
                Margin="0,0,2,0"
                                IsEditable="True"
                                IsTextSearchEnabled="True"
                VerticalAlignment="Center"
                ItemsSource="{Binding SimpleFilter.AvailableMembers}"
                SelectedItem="{Binding SimpleFilter.SelectedMember, Mode=TwoWay}"
                MinWidth="100"/>
                            <telerik:RadComboBox
                Name="PART_SimpleFilterOperatorComboBox"
                Margin="0,0,2,0"
                VerticalAlignment="Center"
                ItemsSource="{Binding SimpleFilter.AvailableOperators}"
                SelectedItem="{Binding SimpleFilter.Operator, Mode=TwoWay, Converter={StaticResource FilterOperatorToSelectedItemConverter}}"
                IsEnabled="{Binding SimpleFilter.Member, Converter={StaticResource FilterMemberToEnabledConverter}}"
                ItemTemplate="{StaticResource FilterOperatorTemplate}"
                MinWidth="100"/>
                            <DataFilter:FilterEditor
                DataContext="{Binding SimpleFilter}"
                ItemPropertyDefinition="{Binding SelectedMember}"
                FilterOperator="{Binding Operator}"
                HorizontalContentAlignment="Stretch"
                IsTabStop="False"
                VerticalContentAlignment="Stretch"
                MinHeight="22"/>
                            <Border Width="8" BorderBrush="Transparent" Visibility="{Binding CanUserCreateCompositeFilters, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
                            <telerik:RadButton x:Name="PART_ToCompositeFilterButton"
                Command="{Binding ToCompositeFilter}"
                Style="{StaticResource AddFilterButtonStyle}"
                Visibility="{Binding CanUserCreateCompositeFilters, Converter={StaticResource BooleanToVisibilityConverter}}"/>
                        </StackPanel>
                    </StackPanel>
                </Border>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
    <Setter Property="HorizontalAlignment" Value="Left"/>
</Style>

Bear in mind that you need to add the following namespace:

xmlns:DataFilter="clr-namespace:Telerik.Windows.Controls.Data.DataFilter;assembly=Telerik.Windows.Controls.Data"

Regards,
Dilyan Traykov
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
DataFilter
Asked by
NOC NOC
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Daniela
Top achievements
Rank 1
crowmw
Top achievements
Rank 1
Dilyan Traykov
Telerik team
Share this question
or