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

Autocomplete dropdown list error

3 Answers 126 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
ITRaona
Top achievements
Rank 2
ITRaona asked on 27 Nov 2009, 05:35 PM
Hi,
Is it possible in a RadComboBox to open the dropdown when we start typing?

I tried in the event of OnKeyUp putting IsDropDownOpen = true, but then the textbox text is selected, so the next key pressed delete the current value. To avoid this behavior I have placed the cursor at the end, but the second key makes no value is selected, even if there are possible values to be selected in the list.

3 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 30 Nov 2009, 05:28 PM
Hello Carles,

You could try setting the OpenDropDownOnFocus property to true. This will open the dropdown when the combo receives the focus, which is usually when the user starts typing.

Sincerely yours,
Valeri Hristov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Folvort
Top achievements
Rank 1
answered on 21 Sep 2010, 12:12 PM
Hi, Valeri

You are wrong.
Then control got focus and when user starts typing are very different events.
So, i have problem like Carles:
How to open dropdown when user starts typing?
0
Valeri Hristov
Telerik team
answered on 21 Sep 2010, 12:43 PM
I understand that receiving focus and typing are different things :) However, this is the closest functionality to the requirement, that comes out of the box.

You could use the following hack instead:
<UserControl.Resources>
    <local:TextToDropDownOpenConverter x:Key="TextToDropDownOpenConverter" />
</UserControl.Resources>





 




<telerik:RadComboBox x:Name="combo1" IsEditable="True"
IsDropDownOpen="{Binding Text, Converter={StaticResource TextToDropDownOpenConverter}, Mode=TwoWay, RelativeSource={RelativeSource Self}}" ... />

public class TextToDropDownOpenConverter : IValueConverter
{
    private string text;

    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    {
        this.text = (string)value;
        return true;
    }

    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
    {
        return this.text;
    }
}

Sincerely yours,
Valeri Hristov
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
Tags
ComboBox
Asked by
ITRaona
Top achievements
Rank 2
Answers by
Valeri Hristov
Telerik team
Folvort
Top achievements
Rank 1
Share this question
or