Setting the SelectedItem

2 posts, 0 answers
  1. Morgan
    Morgan avatar
    15 posts
    Member since:
    Nov 2014

    Posted 20 Nov 2015 Link to this post

    I have an AutoCompleteBox defined like this:

    <telerik:RadAutoCompleteBox Grid.Row="4" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,3,6,3"
         WatermarkContent="Interviewer's name..."
         DropDownItemTemplate="{StaticResource RoomInterviewerSearchAutoComplete}"
         BorderBrush="#FF25A0DA" BorderThickness="1"
         SelectionChanged="Acb_Interviewer_OnSelectionChanged" />
     <DataTemplate x:Key="RoomInterviewerSearchAutoComplete">
        <StackPanel Orientation="Horizontal">
            <TextBlock Text="{Binding}" Style="{StaticResource AutoCompleteStyle}" />


    The ItemSource is set to a List<string>.

    I then try something like this but acb_Interviewer.SelectedItem remains null and only the watermark is visible in the control.

    string interviewerName = dbContext.Users.First(u => u.Id == interview.PrimaryUserId).FullName;
    acb_Interviewer.SelectedItem = interviewerName;


     What am I doing wrong?

  2. Geri
    Geri avatar
    60 posts

    Posted 24 Nov 2015 Link to this post

    Hi Morgan,

    We tried to reproduce the behavior you describe, but with no luck.
    Please find attached a sample project we used for testing purposes. It would be of great help if you could modify it so that the described behavior to appear and send it back or send us a runnable sample project of your own. This way, we can be sure we're on the same page and could further investigate.

    Looking forward to your reply.

    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 Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
Back to Top