Implements prefix-based autocomplete that completes the editable text from matching list items.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class AutoCompleteAppendHelper : BaseAutoComplete, IDisposable
Inheritance: objectBaseAutoCompleteAutoCompleteAppendHelper
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes the autocomplete helper for the specified drop-down list.
public AutoCompleteAppendHelper(RadDropDownListElement owner)
The drop-down list whose items and editable text are used for completion.
Properties
Gets the text currently being matched against the list items.
protected string FindString { get; }
LimitToList Property
public bool LimitToList { get; set; }
Gets the comparison mode used for prefix matching, based on the owner's case-sensitivity setting.
protected StringComparison StringComparison { get; }
Methods
Completes the editor text from a matching item, or optionally prevents a character that would leave the list.
public void AutoComplete(KeyPressEventArgs e, bool limitToList)
The key press to process.
limitToListbooltrue to mark an unmatched character as handled, except for Backspace; otherwise, allow unmatched input.
Processes a key press using the current LimitToList setting.
public override void AutoComplete(KeyPressEventArgs e)
The key press to process as autocomplete input.
Overrides:
Determines whether an item's cached text starts with the current find string.
protected virtual bool DefaultCompare(RadListDataItem item)
The list item to compare.
Returns:true when the item's cached text has the current prefix; otherwise, false.
Finds an enabled item whose cached text starts with the specified string, preferring an exact-length match.
Finds a prefix match and updates the editor text, selecting the unmatched suffix when a match is found.
public virtual void SearchForStringInList(string findString)
The text to match at the beginning of an enabled item's cached text.
Copies the cached text of the specified owner item into the editable area.
protected virtual void SetEditableElementText(int itemIndex)
The index of the item whose text is copied.