Bad experince with RadComboBox and IsEditable

4 posts, 0 answers
  1. Daniel
    Daniel avatar
    2 posts
    Member since:
    Apr 2014

    Posted 30 Apr 2014 Link to this post

    Hello,
    i have some trouble with the RadComboBox control.

    Window is Loaded, see Screenshot 001
    I clicked in RadComboBox, see Screenshot 002
    I typed in "14" and pressed Enter, see Screenshot 003

    I clicked again in RadComboBox and I have severell problems. (see Screenshot 004)
    • Marked Text cannot be overriden
    • DropDown doesn't show up, even if I clicked clear
    • No caret appears

    The Code is very minimalistic
    <Window x:Class="RadComboBoxSample.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
            Title="MainWindow" Height="220" Width="220">
        <Window.Resources>
            <Style x:Key="RadComboBoxContentUserControlStyle" TargetType="telerik:RadComboBox">
                <Setter Property="Margin" Value="10" />
                <Setter Property="Padding" Value="10" />
                <Setter Property="HorizontalAlignment" Value="Stretch" />
                <Setter Property="IsReadOnly" Value="True" />
                <Setter Property="IsEditable" Value="True" />
                <Setter Property="IsFilteringEnabled" Value="True" />
                <Setter Property="CanAutocompleteSelectItems" Value="True" />
                <Setter Property="CanKeyboardNavigationSelectItems" Value="True" />
                <Setter Property="OpenDropDownOnFocus" Value="True" />
                <Setter Property="TextSearchMode" Value="Contains" />
                <Setter Property="ClearSelectionButtonVisibility" Value="Visible" />
                <Setter Property="ClearSelectionButtonContent" Value="Clear" />
                <Setter Property="EmptyText" Value="Please select" />
            </Style>
        </Window.Resources>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" MinWidth="200" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <telerik:RadComboBox Grid.Column="0" Grid.Row="0" Style="{StaticResource RadComboBoxContentUserControlStyle}">
                <telerik:RadComboBoxItem Content="14 - Car" />
                <telerik:RadComboBoxItem Content="15 - Airplane" />
                <telerik:RadComboBoxItem Content="16 - Boat" />
                <telerik:RadComboBoxItem Content="17 - Bike" />
            </telerik:RadComboBox>
        </Grid>
    </Window>




  2. Masha
    Admin
    Masha avatar
    355 posts

    Posted 30 Apr 2014 Link to this post

    Hello Daniel,

    Please try to remove IsReadOnly property of RadComboBoxContentUserControlStyle and everything should work as expected. That is the main reason that the caret brush is not appear and the text can not be overridden.

    I hope this helps.

    Regards,
    Masha
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Daniel
    Daniel avatar
    2 posts
    Member since:
    Apr 2014

    Posted 02 May 2014 in reply to Masha Link to this post

    thx for your reply.

    But there is still the problem, that, once selected, the DropDown only appears if focused another element.
  5. Kalin
    Admin
    Kalin avatar
    1209 posts

    Posted 06 May 2014 Link to this post

    Hello Daniel,

    I've tested the provided sample and after removing the IsReadOnly property as Masha has suggested our previous post everything works as expected. I have attached a video of my tests - check it and let me know there something I'm missing here. However I assume the issues you face are caused by some other style affecting the elements in the ComboBox - please try to isolate the ComboBox in a separate project to see whether the issues still exist.

    Hope this helps.

    Regards,
    Kalin
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top