0

I have a Telerik RadDropDownList whose auto-complete property is set. The auto complete list display works just fine and I am able to use my mouse to select an item. However, I am unable to iterate through the auto-complete list using my down-arrow key. When the list gets displayed and I hit the down-arrow key once, the first value automatically gets selected. When I hit the down-arrow key again(to iterate to the next element), the application freezes and crashes.

Also, I am not quite sure how the SelectedIndex is suppose to work. In my code below, the event SelectedIndexChanged gets called when there is a change in the index position, however, the PopulateTasks method gets called even before I select an item from the drop-down list.

I tried using

radDropDownList1.SelectedItem.Selected == true 

condition to call PopulateTasks method only once an item is selected, but that dosnt seem to work.

Any ideas what I could try?

void PopulateProjects()
{
 radDropDownList1.BeginUpdate();
 radDropDownList1.DataSource = ditems;
 radDropDownList1.DisplayMember = "ProjectName";
 radDropDownList1.ValueMember = "ProjectName";
 radDropDownList1.DropDownListElement.AutoCompleteSuggest.SuggestMode = 
 Telerik.WinControls.UI.SuggestMode.Contains;
 Size popupSize = new Size(650, 400);                   
radDropDownList1.DropDownListElement.AutoCompleteSuggest.DropDownList.DropDownMinSize = popupSize;
     radDropDownList1.DropDownListElement.DropDownMinSize = popupSize;
     radDropDownList1.ListElement.Font = new Font("Microsoft Sans Serif", 16);            radDropDownList1.DropDownListElement.AutoCompleteSuggest.DropDownList.Popup.Font = new System.Drawing.Font("Microsoft Sans Serif", 16);
     radDropDownList1.EndUpdate();
     radDropDownList1.SelectedIndex = 0;
     radDropDownList1.Text = "Select Project";
    }

My event handler:

private void raddropdownlist1_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e)
        {
            if (radDropDownList1.SelectedIndex >1)
            {
                if (radDropDownList1.SelectedItem.Selected == true)
                {
                    radTaskList.Select();
                    PopulateTasks();
                }
                if (this.GetMainForm().IsResetApp)
                {
                    return;
                }
            }
        }
V_stack
  • 69
  • 1
  • 11

1 Answers1

0

RadDropDownList populates the items in the autocomplete popup that match the user's input while you are typing. Once the autocomplete popup is opened and the items are filtered you can navigate through the items via the arrow keys. The default behavior is illustrated in the following video: https://www.screencast.com/t/vIHGY1HRLSq

It is not clear enough how the code in the SelectedIndexChanged event affects the RadDropDownList itself but it seems to refresh it somehow which may lead to the described undesired behavior. But these are just my conjectures since I am not aware of the complete implementation that you have on your end.

Since you are experiencing problems with the keyboard navigation, I would kindly ask you to submit a support ticket from your Telerik account. Thus, the Telerik support engineers will gladly assist you.

Thank you for your cooperation.

Dess
  • 374
  • 1
  • 2