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

Bad experince with RadComboBox and IsEditable

3 Answers 128 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 30 Apr 2014, 12:33 PM
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>




3 Answers, 1 is accepted

Sort by
0
Masha
Telerik team
answered on 30 Apr 2014, 06:19 PM
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.
 
0
Daniel
Top achievements
Rank 1
answered on 02 May 2014, 06:31 AM
thx for your reply.

But there is still the problem, that, once selected, the DropDown only appears if focused another element.
0
Kalin
Telerik team
answered on 06 May 2014, 11:41 AM
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.
 
Tags
ComboBox
Asked by
Daniel
Top achievements
Rank 1
Answers by
Masha
Telerik team
Daniel
Top achievements
Rank 1
Kalin
Telerik team
Share this question
or