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

Using AutoComplete with DropDownList style

4 Answers 124 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
IT Department
Top achievements
Rank 1
IT Department asked on 14 Jul 2014, 05:48 PM
I cannot seem to get AutoComplete to behave properly when I have the DropDownStyle property set to DropDownList.

AutoComplete works with multiple typed characters only when the user is able to type very fast. Even a slight delay in keyboard activity (1/4 second or less) causes the next key press to start looking through the item list as though we are looking for a match on the first character.

As a simple example, if I have a dropdown with the following names in the item list:
Aaron
Alice
Allen
Betty
Bill
Bob
Larry

If I am looking for Allen, I can very quickly type A-L-L and the correct entry is chosen. However, even a slight delay between A and L, or between the first and second L will cause Larry to be selected.

If I set the DropDownStyle property to Dropdown, I can type A-L-L as slowly as I want and select Allen. However, this does not prevent the user from entering a value that is not in the list.

I have tried all of the AutoCompleteMode options and none of them seem to make any difference.

Is there a property that would increase the time allowed between keystrokes and still recognize it as a single entry?





4 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 17 Jul 2014, 01:43 PM
Hello Grant,

Thank you for writing.

There is a search timer, which Interval is set to 300 milliseconds by default. You can modify it using the ListElement.KeyboardSearchResetInterval property, which specifies how long the user must wait before searching with the keyboard is reset.

I hope this information helps. Should you have further questions, I would be glad to help.

Regards,
Desislava
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
IT Department
Top achievements
Rank 1
answered on 17 Jul 2014, 02:55 PM
Yes, this is exactly what I was looking for. We have some pretty long item lists, and sometimes it takes 3 or 4 characters to get to the item that you want. Setting this interval to 1500 milliseconds did the trick.
0
John
Top achievements
Rank 1
answered on 12 Feb 2015, 06:31 PM
Hi,

Is there a similar property in GridViewComboBoxColumn to control the reset interval.

Thanks,

John
0
Stefan
Telerik team
answered on 13 Feb 2015, 06:52 AM
Hello John,

Yes, there is. To access an editor in the grid to edit its properties you should use the CellEditorInitialized event:
void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
RadDropDownListEditor ddlEditor = e.ActiveEditor as RadDropDownListEditor;
if (ddlEditor != null)
{
    RadDropDownListEditorElement ddlEditorElement = (RadDropDownListEditorElement)ddlEditor.EditorElement;
    ddlEditorElement.ListElement.KeyboardSearchResetInterval = 1000;
}

More on the editors in the grid can be found here: http://www.telerik.com/help/winforms/gridview-editors.html.

I hope that you find this information useful. Should you have any other questions, do not hesitate to contact us.

Regards,
Stefan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
DropDownList
Asked by
IT Department
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
IT Department
Top achievements
Rank 1
John
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or