Custom Member Selector

5 posts, 1 answers
  1. NOC NOC
    NOC NOC avatar
    6 posts
    Member since:
    Mar 2010

    Posted 31 Aug 2010 Link to this post

    Hi,

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

    Is this possible?
  2. Answer
    Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 31 Aug 2010 Link to this post

    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
  3. DevCraft banner
  4. Daniela
    Daniela avatar
    21 posts
    Member since:
    Jun 2012

    Posted 08 Nov 2013 Link to this post

    Hi!
    Is there an update on this?
    Our customer wants to have a typeAHeadCombobox instead of a Combobox as Member Drop down.
  5. crowmw
    crowmw avatar
    7 posts
    Member since:
    Jul 2014

    Posted 23 Jun Link to this post

    Is there any updates since 2010?

     

  6. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    371 posts

    Posted 24 Jun Link to this post

    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.
Back to Top
DevCraft banner