Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2070
WebDropDown Filtering and fixing typing errors with Backspace.
posted

So I have a number of WebDropDowns that have auto filtering turned on. Basically, we want the user to be able to type into the WebDropDown text box and auto-select an available drop down selection (in addition to using the drop down itself). We want to limit them to only selecting what is available in the drop down (no custom selections).

The problem is, if they start typing something and then find they are selecting the wrong item, they can't backspace to correct it - they have to select the WHOLE text field and start all over again.

For instance, say we have the following drop down:

<ig:WebDropDown ID="ddlTest" runat="server" 
        DropDownContainerHeight="100px" DropDownOrientation="Default" 
        EnableAnimations="False" EmptyFilterBehavior="LimitToAutoFilterResultSize" 
        EnableAutoFiltering="Client" EnableCustomValues="False" EnableCustomValueSelection="False" 
        NullText="None Selected" PageSize="10" Width="250px">
        <ClientEvents Focus="WebDropDown_Focus_SelectAll" />
</ig:WebDropDown>

In that drop down we have three items loaded: 100 - Test One, 200 - Test 2, and 300 - Test 3. So now they click into the text field, and begin by typing a 3 - it autoselects the 300 option. However, let's say that as soon as they hit 3 they realized it was a mistake, and they really meant to hit 2. At this point, you can't backspace to erase the 2 so that you can re-enter a 3. One ends up having to reselect the entire text field in the drop down, then press backspace, and finally retype the 2 to begin autoselecting items that start with 2.

Isn't there any way to allow the backspace to be used in the text box to remove the last entered character? In my case, you are only allowed to enter a matching character, so one could not enter anything invalid anyway.

I added the ClientEvent for FOCUS just so that it will auto-select the entire text field when that field gets focus, so that it makes it easier to start all over. But it seems there should be a way for one to 'correct' an incorrectly typed value.

Ideas?

-Tom