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

Autocomplete is not working

2 Answers 108 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Tony
Top achievements
Rank 1
Tony asked on 16 Apr 2012, 07:11 PM
I have a RadComboBox on a form in my WPF application:

<telerik:RadComboBox BorderBrush="{DynamicResource ControlBorder}"
                     CanAutocompleteSelectItems="True"
                     Focusable="True"
                     FontSize="18"
                     FontWeight="Bold"
                     Foreground="{DynamicResource TextForeground}"
                     Height="32"
                     HorizontalAlignment="Left"
                     IsEditable="True"
                     IsFilteringEnabled="True"
                     IsTextSearchCaseSensitive="False"
                     IsTextSearchEnabled="True"
                     ItemsSource="{Binding Path=RecentUsers, Mode=TwoWay, RelativeSource={RelativeSource AncestorType={x:Type c:LoginForm}}}"
                     Name="UsersName"
                     TabIndex="1"
                     Width="300" />

In my code-behind, I have declared a DependencyProperty called RecentUsersProperty:

public static readonly DependencyProperty RecentUsersProperty =
    DependencyProperty.Register( "RecentUsers", typeof( string[] ), typeof( LoginForm ), new PropertyMetadata( null ) );
  
public string[] RecentUsers {
    get { return (string[]) GetValue( RecentUsersProperty ); }
    set { SetValue( RecentUsersProperty, value ); }
}

In the Loaded event handler of the window that contains this field, I set the RecentUsers to an array of strings retrieved from the database:

RecentUsers = DataInterface.GetRecentUsers( 90 );

Here's the data that's returned by the call to GetRecentUsers:

"adam.st.onge@eoc4.elsagrd.com"
"chris.theet"
"jklepacz1"
"nwhaley"
"rcass"
"tonyb"
"tony.vitabile"

When the window is displayed and I start typing the name of a user that is in the RecentUsers array, autocomplete does not fill in the rest of the matching name.  If I tab out of the field, though, it selects the first one that matches. 

What am I doing wrong?  I'm using the 2012.1.326.40 version of the Telerik libraries.

Tony

2 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 17 Apr 2012, 09:51 AM
Hi Tony,


I would suggest removing the IsFilteringEnabled="True" property for the RadComboBox control. For more information about autocompleting and filtering, please refer to our help -  

Hope this helps.


Regards,
George
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Tony
Top achievements
Rank 1
answered on 17 Apr 2012, 01:17 PM
George:

Thank you, that did it!

Tony
Tags
ComboBox
Asked by
Tony
Top achievements
Rank 1
Answers by
George
Telerik team
Tony
Top achievements
Rank 1
Share this question
or