Class Autocomplete
Represents the Autocomplete UI element.
Implements
Inherited Members
Namespace: Syncfusion.JavaScript.Web
Assembly: Syncfusion.EJ.Web.dll
Syntax
public class Autocomplete : CommonDataBoundControl, INamingContainer, IPostBackEventHandler, IPostBackDataHandler, IUrlResolutionService
Constructors
Autocomplete()
Declaration
public Autocomplete()
Properties
AddNewText
Customize “Add New†text (label) to be added in the autocomplete popup list for the entered text when there are no suggestions for it
Declaration
public string AddNewText { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
AllowAddNew
Specifies new values to be added to the autocomplete input other than the values in the suggestion list
Declaration
public bool AllowAddNew { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
AllowGrouping
The allowGrouping property has been deprecated. Use groupBy field instead of allowGrouping.
Declaration
public bool AllowGrouping { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
AllowSorting
Sorts the list value in ascending order
Declaration
public bool AllowSorting { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
AnimateType
Sets an animate to Autocomplete suggesstion list
Declaration
public AnimateTypes AnimateType { get; set; }
Property Value
| Type | Description |
|---|---|
| AnimateTypes |
AutoFocus
This property activates the first element and it automatically focuses on the first element in the popup
Declaration
public bool AutoFocus { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
CaseSensitiveSearch
Sets the case sensitivity to the search operation
Declaration
public bool CaseSensitiveSearch { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
ClientSideOnActionBegin
Fires when Autocomplete control search action begin
Declaration
public string ClientSideOnActionBegin { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ClientSideOnActionComplete
Fires when Autocomplete control search action completed
Declaration
public string ClientSideOnActionComplete { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ClientSideOnActionFailure
Fires after Autocomplete control action failure
Declaration
public string ClientSideOnActionFailure { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ClientSideOnActionSuccess
Fires after Autocomplete control action success
Declaration
public string ClientSideOnActionSuccess { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ClientSideOnChange
Fires when Autocomplete value is changed successfully
Declaration
public string ClientSideOnChange { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ClientSideOnClose
Fires after Autocomplete control popup is closed
Declaration
public string ClientSideOnClose { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ClientSideOnCreate
Fires after Autocomplete control is created
Declaration
public string ClientSideOnCreate { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ClientSideOnDestroy
Fires when the Autocomplete is destroyed successfully
Declaration
public string ClientSideOnDestroy { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ClientSideOnFocusIn
Fires when Autocomplete textbox is focused
Declaration
public string ClientSideOnFocusIn { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ClientSideOnFocusOut
Fires after the Autocomplete textbox gets out of the focus
Declaration
public string ClientSideOnFocusOut { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ClientSideOnOpen
Fires after Autocomplete control popup is opened
Declaration
public string ClientSideOnOpen { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ClientSideOnSelect
Fires when an item has been selected successfully
Declaration
public string ClientSideOnSelect { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
CssClass
The root class for the Autocomplete textbox widget which helps in customizing its theme
Declaration
public string CssClass { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
DataCategoryField
Mapping Field for Category property
Declaration
public string DataCategoryField { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
DataGroupByField
Mapping Field for groupBy property
Declaration
public string DataGroupByField { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
DataHtmlAttributeField
Mapping Field for HtmlAttribute property
Declaration
public string DataHtmlAttributeField { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
DataManager
Data Manager as Inner property, which help us to bind the data sources from data adaptors
Declaration
public DataSource DataManager { get; set; }
Property Value
| Type | Description |
|---|---|
| DataSource |
DataSource
The dataSource contains the list of data for the suggestions list. It can be a string array or JSON array
Declaration
public object DataSource { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Object |
DataSourceCachingMode
Sets the cache mode to maintain data on post back
Declaration
public DataSourceCachingMode DataSourceCachingMode { get; set; }
Property Value
| Type | Description |
|---|---|
| DataSourceCachingMode |
DataTextField
Mapping Field for Text property
Declaration
public string DataTextField { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
DataUniqueKeyField
Mapping Field for UniqueKey property
Declaration
public string DataUniqueKeyField { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
DelaySuggestionTimeout
The time delay (in milliseconds) after which the suggestion popup will be shown
Declaration
public int DelaySuggestionTimeout { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Delimiter
The special character which acts as a separator for the given words for multi-mode search i.e. the text after the delimiter are considered as a separate word or query for search operation
Declaration
public string Delimiter { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
EmptyResultText
The text to be displayed in the popup when there are no suggestions available for the entered text
Declaration
public string EmptyResultText { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
EnableAutoFill
Automatically fills the first item from the suggestion list in an AutoComplete text box. The AutoFill property is only applicable for “Startswith†FilterType type
Declaration
public bool EnableAutoFill { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Enabled
Defines whether the Autocomplete control is enable or disable
Declaration
public bool Enabled { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
EnableDistinct
Prevents the duplicate names presents in the search result
Declaration
public bool EnableDistinct { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
EnablePersistence
Saves the current model value to the browser cookies for maintaining states. On refreshing, the Autocomplete control page retains the model value applied from browser cookies
Declaration
public bool EnablePersistence { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
EnableRTL
Sets whether the textbox direction displayed by the AutoComplete control is displayed from right to left
Declaration
public bool EnableRTL { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Fields
Declaration
public AutocompleteFields Fields { get; }
Property Value
| Type | Description |
|---|---|
| AutocompleteFields |
FilterType
Sets the search filter type
Declaration
public FilterOperatorType FilterType { get; set; }
Property Value
| Type | Description |
|---|---|
| FilterOperatorType |
Height
Defines the height of the Autocomplete textbox
Declaration
public override Unit Height { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Web.UI.WebControls.Unit |
HighlightSearch
Enables the highlight search option for the corresponding string entered in the textbox is highlighted in the suggestion list
Declaration
public bool HighlightSearch { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
HtmlAttributes
Specifies HtmlAttributes of the Autocomplete
Declaration
public IDictionary<string, object> HtmlAttributes { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IDictionary<System.String, System.Object> |
IgnoreAccent
Autocomplete textbox to be displayed with rounded corner style, when it's enabled
Declaration
public bool IgnoreAccent { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
ItemsCount
Counts the item that is displayed in the popup
Declaration
public int ItemsCount { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Locale
Defines the localization culture for the Autocomplete
Declaration
public string Locale { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
MinCharacter
Minimum number of character to be entered in the Autocomplete textbox to show the suggestion list
Declaration
public int MinCharacter { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Model
Collection of Autocomplete model items
Declaration
public AutocompleteProperties Model { get; set; }
Property Value
| Type | Description |
|---|---|
| AutocompleteProperties |
MultiColumnSettings
Specifies the column to be displayed in popupList
Declaration
[JsonProperty("multiColumnSettings")]
public MultiColumnSettings MultiColumnSettings { get; set; }
Property Value
| Type | Description |
|---|---|
| MultiColumnSettings |
MultiSelectMode
Allows selection of multiple values from the suggestion list
Declaration
public MultiSelectModeTypes MultiSelectMode { get; set; }
Property Value
| Type | Description |
|---|---|
| MultiSelectModeTypes |
Name
Specifies the Name of the Autocomplete
Declaration
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
PopupHeight
Defines the Popup Height of the suggestion box
Declaration
public string PopupHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
PopupWidth
Defines the Popup Width of the suggestion box
Declaration
public string PopupWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Query
Specifies the query to retrieve the data from server
Declaration
public string Query { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ReadOnly
Indicates that the autocomplete textbox values can only be read
Declaration
public bool ReadOnly { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
SelectValueByKey
Sets the value for the Autocomplete textbox based on the given input key value
Declaration
public string SelectValueByKey { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ShowEmptyResultText
Enables or disables showing the message when there are no suggestions for the entered text
Declaration
public bool ShowEmptyResultText { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
ShowLoadingIcon
Enables the loading icon to intimate the searching operation. The loading icon is visible when there is a time delay to perform the search
Declaration
public bool ShowLoadingIcon { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
ShowPopupButton
Enables the ShowPopup button. When the ShowPopup button is clicked, it displays the full list from the DataSource
Declaration
public bool ShowPopupButton { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
ShowResetIcon
Enables the reset icon while searching
Declaration
public bool ShowResetIcon { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
ShowRoundedCorner
Autocomplete textbox to be displayed with rounded corner style, when it's enabled
Declaration
public bool ShowRoundedCorner { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
SortOrder
SortOrder specifies whether the suggestion list values have to be displayed in an ascending or descending order
Declaration
public SortOrder SortOrder { get; set; }
Property Value
| Type | Description |
|---|---|
| SortOrder |
Template
The template to display the suggestion list items with customized appearance
Declaration
public string Template { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ValidationMessage
Get or set the Validation message
Declaration
public List<KeyValue> ValidationMessage { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<KeyValue> |
ValidationMsg
Get or set the Validation message
Declaration
[JsonProperty("validationMessage")]
public Dictionary<string, object> ValidationMsg { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.Dictionary<System.String, System.Object> |
ValidationRule
Get or set the ValidationRule
Declaration
public List<KeyValue> ValidationRule { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<KeyValue> |
ValidationRules
Get or set the ValidationRules
Declaration
[JsonProperty("validationRules")]
public Dictionary<string, object> ValidationRules { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.Dictionary<System.String, System.Object> |
Value
Defines the value to be displayed in the autocomplete textbox
Declaration
public string Value { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Visible
Defines whether the Autocomplete control is visible or not
Declaration
public bool Visible { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
WatermarkText
Sets the WatermarkText text
Declaration
public string WatermarkText { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Width
Defines the width of the Autocomplete textbox
Declaration
public override Unit Width { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Web.UI.WebControls.Unit |
Methods
ClearSelection()
Method to clear values
Declaration
public void ClearSelection()
DependentScripts()
Represents the dependent scripts for Autocomplete control.
Declaration
public List<string> DependentScripts()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.String> |
FetchData(IEnumerable)
Fetching the data
Declaration
public override void FetchData(IEnumerable data)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.IEnumerable | data |
Overrides
GetDependentFiles()
Represents the dependent Files for Autocomplete control.
Declaration
public override List<string> GetDependentFiles()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.String> |
Overrides
LoadViewState(Object)
Restores view-state information from a previous page request.
Declaration
protected override void LoadViewState(object state)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | state |
Overrides
PostBackEventHandler(String, Dictionary<String, Object>)
Gets a value that indicates whether the page is being loaded in response to a postback.
Declaration
public override void PostBackEventHandler(string EventName, Dictionary<string, object> args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | EventName | |
| System.Collections.Generic.Dictionary<System.String, System.Object> | args |
Overrides
Render()
Render this instance
Declaration
public string Render()
Returns
| Type | Description |
|---|---|
| System.String |
Render(HtmlTextWriter)
Render method for rendering control
Declaration
protected override void Render(HtmlTextWriter writer)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Web.UI.HtmlTextWriter | writer |
Overrides
SaveViewState()
Saves any server control view-state changes that have occurred since the time the page was posted back to the server.
Declaration
protected override object SaveViewState()
Returns
| Type | Description |
|---|---|
| System.Object |
UpdateServerModel(Dictionary<String, Object>)
Maintaining viewstate model values on post back
Declaration
public override void UpdateServerModel(Dictionary<string, object> ClientModel)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.Dictionary<System.String, System.Object> | ClientModel |
Overrides
Events
FocusOut
Triggered when the autocomplete textbox gets out of the focus
Declaration
public event Autocomplete.AutocompleteEventHandler FocusOut
Event Type
| Type | Description |
|---|---|
| Autocomplete.AutocompleteEventHandler |
ValueSelect
Triggered when the value is selected
Declaration
public event Autocomplete.AutocompleteSelectEventHandler ValueSelect
Event Type
| Type | Description |
|---|---|
| Autocomplete.AutocompleteSelectEventHandler |