Version

AutoCompleteMode Property

Gets/sets the mode for automatic completion of text typed in the edit portion.
Syntax
'Declaration
 
Public Property AutoCompleteMode As Infragistics.Win.AutoCompleteMode
public Infragistics.Win.AutoCompleteMode AutoCompleteMode {get; set;}
Remarks

Note: This property replaces the AutoComplete property, which is now obsolete. Setting the AutoCompleteMode property to 'Append' is the functional equivalent of setting AutoComplete to true.

Prior to the addition of the AutoCompleteMode property, automatic value completion was supported in the form of the now obsolete AutoComplete property, which, when enabled, modified the control's text by appending characters to the string typed by the end user so as to match the text of the first item found in the list whose text begins with the typed characters. For example, given a list which contains an item whose text is "Apple", when the end user types the string "Ap", the edit portion would then be updated to include the remaining characters, "ple", so that the text of the first item that matches the typed string, "Apple", becomes selected. That same functionality is now enabled by setting AutoCompleteMode to 'Append'. The appended characters are selected so that continuing to type causes these characters to be removed.

The AutoCompleteMode property extends two additional modes for value completion, 'Suggest' and 'SuggestAppend'. When the property is set to 'Suggest', no characters are appended to the edit portion, but rather the dropdown is automatically displayed, showing only the items whose text begins with the string that was typed by the end user. For example, given a list containing the items, "Apple", "Application", and "Apprehend", upon typing the "A" character, the dropdown list will appear, displaying all of those items. The list is continually filtered as more characters are typed, eliminating the entries whose text no longer matches the typed string. For example, if the continues typing until the edit portion contains "Appl", the "Apprehend" item would be removed from the list, since the presence of the character "l" in the typed string now precludes that item.

The 'SuggestAppend' setting essentially combines the funtionality extended by the 'Append' and 'Suggest' settings. The dropdown list is automatically displayed and filtered as needed, and text is appended to the edit portion to complete the typed text to match the first item with matching text.

When using the 'Suggest' or 'SuggestAppend' modes, the SelectionChanged and SelectionChangeCommitted events only fire when an item is explicitly selected by the end user, i.e., when the Enter key is pressed or when an item is clicked. This is in contrast with the 'Append' setting, for which those events are also fired when an item is selected implicitly (when text is appended to complete a partial match).

MRU (Most Recently Used) functionality is suspended when the control is in "suggest" mode, that is, when the property is set to 'Suggest' or 'SuggestAppend'. This is because in those modes, the dropdown must only contain the filtered items.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also