Hello,
I have a dropdown provider in a webdatagrid. I want to use the dropdown provider as a non-editable list but also use the TypeAhead feature. I am using 'DisplayMode=DropDownlist.
Thanks,
Hi,
I am trying to find a good solution for type ahead for the webdatagrid dropdownprovider as well. I have used the suggested solution stated here by setting DisplayMode="DropDown", EnableCustomValues="false" and EnableAutoCompleteFirstMatch="true". This sort of works. I wouldn't say that it completely works.
I have been able to successfully type faster than the AutoComplete finds values (testing with 50 states sorted alphabetically and about a handful of other values at the beginning and end of the dropdown list). When clicking outside of the field after "fd" is typed for example the grid will retain "fd" in the cell. This is not good, b/c the grid also sends this value back to the server on postbacks and retains it on a reload. Really, in an optimal implementation the AutoComplete wouldn't let any keys be type that weren't in valid as the next value.
Can someone please provide clarification or is a hack needed to prevent occurrances of this nature?
Thanks, Pat.
When the dropdown editor DisplayMode is set to DropDownList, it returns the values as a list. This setting because it is a list does not allow for editing. As such the user would be unable to type into the text editor. When the dropdown DisplayMode is set to DropDown, typing into the text editor is possible and the type ahead functionality is then available.
What you can do to enable the desired functuinality is set the dropdown editor provider DisplayMode to 'DropDown', and to ensure that the user is unable to set custom values in the grid cell, you can set the following properties on the dropdown provider:
EnableCustomValues = false AutoCompleteFirstMatch = true
With these settings, when the user enters the first match from an item in the dropdown the item will be selected. Otherwise, no other values can be entered to the grid cell.
Please let me know if you need any additional assistance regarding this matter.