Autocomplete dropdown list error

4 posts, 0 answers
  1. ITRaona
    ITRaona avatar
    4 posts
    Member since:
    Jun 2007

    Posted 27 Nov 2009 Link to this post

    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.
  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 30 Nov 2009 Link to this post

    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.
  3. DevCraft banner
  4. Folvort
    Folvort avatar
    7 posts
    Member since:
    Jun 2010

    Posted 21 Sep 2010 Link to this post

    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?
  5. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 21 Sep 2010 Link to this post

    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
Back to Top