Class AutocompletePropertiesBuilder
Represents a class for AutocompletePropertiesBuilder which includes show popup button, enable auto fill, enable persistence, height, width, etc.
Inheritance
System.Object
AutocompletePropertiesBuilder
Implements
System.Web.IHtmlString
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Syncfusion.EJ.dll
Syntax
public class AutocompletePropertiesBuilder : IPropertiesBuilder, IHtmlString
Constructors
AutocompletePropertiesBuilder()
Declaration
public AutocompletePropertiesBuilder()
AutocompletePropertiesBuilder(Autocomplete)
Declaration
public AutocompletePropertiesBuilder(Autocomplete autocomplete)
Parameters
Fields
autocomplete
Declaration
public Autocomplete autocomplete
Field Value
Methods
AddNewText(String)
Customize “Add New” text (label) to be added in the autocomplete popup list for the entered text when there are no suggestions for it. A string argument 'addNewText' is passed.
Declaration
public AutocompletePropertiesBuilder AddNewText(string addNewText)
Parameters
Type |
Name |
Description |
System.String |
addNewText |
|
Returns
AllowAddNew()
Allows new values to be added to the autocomplete input other than the values in the suggestion list. Normally, when there are no suggestions it will display “No suggestions” label in the popup.
Declaration
public AutocompletePropertiesBuilder AllowAddNew()
Returns
AllowAddNew(Boolean)
Allows new values to be added to the autocomplete input other than the values in the suggestion list. Normally, when there are no suggestions it will display “No suggestions” label in the popup. By passing an argument with true condition as 'allowAddNew' this property is enabled.
Declaration
public AutocompletePropertiesBuilder AllowAddNew(bool allowAddNew)
Parameters
Type |
Name |
Description |
System.Boolean |
allowAddNew |
|
Returns
AllowGrouping()
The allowGrouping property has been deprecated.Use groupBy field instead of allowGrouping
Declaration
[Obsolete("The AllowGrouping property has been deprecated. Use 'GroupBy' field instead of AllowGrouping")]
public AutocompletePropertiesBuilder AllowGrouping()
Returns
AllowGrouping(Boolean)
Declaration
public AutocompletePropertiesBuilder AllowGrouping(bool allowGrouping)
Parameters
Type |
Name |
Description |
System.Boolean |
allowGrouping |
|
Returns
AllowSorting()
Enables or disables the sorting of suggestion list item. The default sort order is ascending order. You customize sort order.
Declaration
public AutocompletePropertiesBuilder AllowSorting()
Returns
AllowSorting(Boolean)
Enables or disables the sorting of suggestion list item. The default sort order is ascending order. You customize sort order. A boolean variable 'allowSorting' is passed. Its value is set as true.
Declaration
public AutocompletePropertiesBuilder AllowSorting(bool allowSorting)
Parameters
Type |
Name |
Description |
System.Boolean |
allowSorting |
|
Returns
AnimateType(AnimateTypes)
Sets an animate to Autocomplete suggesstion list.
Declaration
public AutocompletePropertiesBuilder AnimateType(AnimateTypes animateType)
Parameters
Returns
AutocompleteFields(Action<AutocompleteFieldsBuilder>)
Mapping fields for the suggestion items of the Autocomplete textbox widget. An argument is passed as list named 'fields'.
Declaration
public AutocompletePropertiesBuilder AutocompleteFields(Action<AutocompleteFieldsBuilder> fields)
Parameters
Returns
AutoFocus()
To focus the items in the suggestion list when the popup is shown. By default first item will be focused.
Declaration
public AutocompletePropertiesBuilder AutoFocus()
Returns
AutoFocus(Boolean)
To focus the items in the suggestion list when the popup is shown. By default first item will be focused. A boolean variable 'autoFocus' is passed with false condition.
Declaration
public AutocompletePropertiesBuilder AutoFocus(bool autoFocus)
Parameters
Type |
Name |
Description |
System.Boolean |
autoFocus |
|
Returns
CaseSensitiveSearch()
Enables or disables the case sensitive search.
Declaration
public AutocompletePropertiesBuilder CaseSensitiveSearch()
Returns
CaseSensitiveSearch(Boolean)
Enables or disables the case sensitive search. A boolean variable 'caseSensitiveSearch' is passed as an argument. Its value is initially set as true.
Declaration
public AutocompletePropertiesBuilder CaseSensitiveSearch(bool caseSensitiveSearch)
Parameters
Type |
Name |
Description |
System.Boolean |
caseSensitiveSearch |
|
Returns
ClientSideEvents(Action<AutocompleteClientSideEventsBuilder>)
The client-side events allow you to perform custom actions on the client in response to end-user manipulations of a control. An argument is passed as list named 'clientSideEvents'.
Declaration
public AutocompletePropertiesBuilder ClientSideEvents(Action<AutocompleteClientSideEventsBuilder> clientSideEvents)
Parameters
Returns
CssClass(String)
The root class for the Autocomplete textbox widget which helps in customizing its theme. A string argument 'cssClass' is passed.
Declaration
public AutocompletePropertiesBuilder CssClass(string cssClass)
Parameters
Type |
Name |
Description |
System.String |
cssClass |
|
Returns
Datasource(DataSource)
The data source contains the list of data for the suggestions list. It can be a string array or json array. A new variable 'dataSource' is passed as an argument.
Declaration
public AutocompletePropertiesBuilder Datasource(DataSource dataSource)
Parameters
Returns
Datasource(Action<DataSourceBuilder>)
The data source contains the list of data for the suggestions list. It can be a string array or json array. An argument is passed as list named 'dataSource'.
Declaration
public AutocompletePropertiesBuilder Datasource(Action<DataSourceBuilder> dataSource)
Parameters
Returns
Datasource(IEnumerable)
The data source contains the list of data for the suggestions list. It can be a string array or json array. An enumerable argument 'dataSource' is passed.
Declaration
public AutocompletePropertiesBuilder Datasource(IEnumerable dataSource)
Parameters
Type |
Name |
Description |
System.Collections.IEnumerable |
dataSource |
|
Returns
DelaySuggestionTimeout(Int32)
The time delay (in milliseconds) after which the suggestion popup will be shown. An argument 'delaySuggestionTimeout' is passed. It is an integer type.
Declaration
public AutocompletePropertiesBuilder DelaySuggestionTimeout(int delaySuggestionTimeout)
Parameters
Type |
Name |
Description |
System.Int32 |
delaySuggestionTimeout |
|
Returns
Delimiter(String)
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. A string argument 'delimiter' is passed.
Declaration
public AutocompletePropertiesBuilder Delimiter(string delimiter)
Parameters
Type |
Name |
Description |
System.String |
delimiter |
|
Returns
EmptyResultText(String)
The text to be displayed in the popup when there are no suggestions available for the entered text. A string variable 'emptyResultText' is passed as an argument.
Declaration
public AutocompletePropertiesBuilder EmptyResultText(string emptyResultText)
Parameters
Type |
Name |
Description |
System.String |
emptyResultText |
|
Returns
EnableAutoFill()
Fills the autocomplete textbox with the first matched item from the suggestion list automatically based on the entered text when enabled.
Declaration
public AutocompletePropertiesBuilder EnableAutoFill()
Returns
EnableAutoFill(Boolean)
Fills the autocomplete textbox with the first matched item from the suggestion list automatically based on the entered text when enabled. An argument is passed as 'enableAutoFill'. It is set as true.
Declaration
public AutocompletePropertiesBuilder EnableAutoFill(bool enableAutoFill)
Parameters
Type |
Name |
Description |
System.Boolean |
enableAutoFill |
|
Returns
Enabled()
Enables or disables the Autocomplete textbox widget.
Declaration
public AutocompletePropertiesBuilder Enabled()
Returns
Enabled(Boolean)
Enables or disables the Autocomplete textbox widget. An argument 'enabled' is passed. It is been set as true.
Declaration
public AutocompletePropertiesBuilder Enabled(bool enabled)
Parameters
Type |
Name |
Description |
System.Boolean |
enabled |
|
Returns
EnableDistinct()
Enables or disables displaying the duplicate names present in the search result.
Declaration
public AutocompletePropertiesBuilder EnableDistinct()
Returns
EnableDistinct(Boolean)
Enables or disables displaying the duplicate names present in the search result. A boolean variable named 'enableDistinct' is passed as an argument.
Declaration
public AutocompletePropertiesBuilder EnableDistinct(bool enableDistinct)
Parameters
Type |
Name |
Description |
System.Boolean |
enableDistinct |
|
Returns
EnablePersistence()
Allows the current model values to be saved in local storage or browser cookies for state maintenance when it is set to true. While refreshing the page, it retains the model value from browser cookies or local storage.
Declaration
public AutocompletePropertiesBuilder EnablePersistence()
Returns
EnablePersistence(Boolean)
Allows the current model values to be saved in local storage or browser cookies for state maintenance when it is set to true. While refreshing the page, it retains the model value from browser cookies or local storage. An argument 'persist' is set as true.
Declaration
public AutocompletePropertiesBuilder EnablePersistence(bool persist)
Parameters
Type |
Name |
Description |
System.Boolean |
persist |
|
Returns
EnableRTL()
Displays the Autocomplete widget’s content from right to left when enabled.
Declaration
public AutocompletePropertiesBuilder EnableRTL()
Returns
EnableRTL(Boolean)
Displays the Autocomplete widget’s content from right to left when enabled. An argument named 'enableRTL' is passed and it is set as true.
Declaration
public AutocompletePropertiesBuilder EnableRTL(bool enableRTL)
Parameters
Type |
Name |
Description |
System.Boolean |
enableRTL |
|
Returns
FilterType(FilterOperatorType)
Specifies the search filter type. There are several types of search filter available such as ‘startswith’, ‘contains’, ‘endswith’, ‘lessthan’, ‘lessthanorequal’, ‘greaterthan’, ‘greaterthanorequal’, ‘equal’, ‘notequal’.
Declaration
public AutocompletePropertiesBuilder FilterType(FilterOperatorType filterType)
Parameters
Returns
Height(String)
The height of the Autocomplete textbox. A string argument 'height' is passed.
Declaration
public AutocompletePropertiesBuilder Height(string height)
Parameters
Type |
Name |
Description |
System.String |
height |
|
Returns
HighlightSearch()
The search text can be highlighted in the AutoComplete suggestion list when enabled.
Declaration
public AutocompletePropertiesBuilder HighlightSearch()
Returns
HighlightSearch(Boolean)
The search text can be highlighted in the AutoComplete suggestion list when enabled. An argument 'highlightSearch' is passed.
Declaration
public AutocompletePropertiesBuilder HighlightSearch(bool highlightSearch)
Parameters
Type |
Name |
Description |
System.Boolean |
highlightSearch |
|
Returns
HtmlAttributes(IDictionary<String, Object>)
It allows to define the characteristics of the Autocomplete control. It will helps to extend the capability of an HTML element.
Declaration
public AutocompletePropertiesBuilder HtmlAttributes(IDictionary<string, object> itemHtmlAttributes)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.Object> |
itemHtmlAttributes |
html Attributes
|
Returns
IgnoreAccent()
The diacritic characters of the Autocomplete suggestion list shown when filtering.
Declaration
public AutocompletePropertiesBuilder IgnoreAccent()
Returns
IgnoreAccent(Boolean)
The diacritic characters of the Autocomplete suggestion list shown when filtering. An argument 'ignoreAccent' is passed.
Declaration
public AutocompletePropertiesBuilder IgnoreAccent(bool ignoreAccent)
Parameters
Type |
Name |
Description |
System.Boolean |
ignoreAccent |
|
Returns
ItemsCount(Int32)
Number of items to be displayed in the suggestion list. An argument 'itemsCount' is passed in integer type.
Declaration
public AutocompletePropertiesBuilder ItemsCount(int itemsCount)
Parameters
Type |
Name |
Description |
System.Int32 |
itemsCount |
|
Returns
Locale(String)
Defines the localization culture for the Autocomplete. A string argument 'locale' is passed.
Declaration
public AutocompletePropertiesBuilder Locale(string locale)
Parameters
Type |
Name |
Description |
System.String |
locale |
|
Returns
MinCharacter(Int32)
Minimum number of character to be entered in the Autocomplete textbox to show the suggestion list. An argument 'minCharacter' is passed in integer type.
Declaration
public AutocompletePropertiesBuilder MinCharacter(int minCharacter)
Parameters
Type |
Name |
Description |
System.Int32 |
minCharacter |
|
Returns
MultiColumnSettings(Action<MultiColumnSettingsBuilder>)
Specifies the column to be displayed in popupList.
Declaration
public AutocompletePropertiesBuilder MultiColumnSettings(Action<MultiColumnSettingsBuilder> tools)
Parameters
Returns
MultiSelectMode(MultiSelectModeTypes)
Enables or disables selecting multiple values from the suggestion list. Multiple values can be selected through either of the following options,
Declaration
public AutocompletePropertiesBuilder MultiSelectMode(MultiSelectModeTypes multiSelectMode)
Parameters
Returns
Name(String)
Specifies the name of the Autocomplete.
Declaration
public AutocompletePropertiesBuilder Name(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
The height of the suggestion list. A string argument 'popupHeight' is passed.
Declaration
public AutocompletePropertiesBuilder PopupHeight(string popupHeight)
Parameters
Type |
Name |
Description |
System.String |
popupHeight |
|
Returns
The width of the suggestion list. A string argument 'popupWidth' is passed.
Declaration
public AutocompletePropertiesBuilder PopupWidth(string popupWidth)
Parameters
Type |
Name |
Description |
System.String |
popupWidth |
|
Returns
Query(String)
The query to retrieve the data from the data source. A variable is passed. This 'query' is in string type.
Declaration
public AutocompletePropertiesBuilder Query(string query)
Parameters
Type |
Name |
Description |
System.String |
query |
|
Returns
Readonly()
Indicates that the autocomplete textbox values can only be readable.
Declaration
public AutocompletePropertiesBuilder Readonly()
Returns
Readonly(Boolean)
Indicates that the autocomplete textbox values can only be readable. The 'readOnly' is an argument that is passed with true value.
Declaration
public AutocompletePropertiesBuilder Readonly(bool readOnly)
Parameters
Type |
Name |
Description |
System.Boolean |
readOnly |
|
Returns
Render()
Declaration
SelectValueByKey(String)
Sets the value for the Autocomplete textbox based on the given input key value. A string argument 'selectValueByKey' is passed.
Declaration
public AutocompletePropertiesBuilder SelectValueByKey(string selectValueByKey)
Parameters
Type |
Name |
Description |
System.String |
selectValueByKey |
|
Returns
ShowEmptyResultText()
Enables or disables showing the message when there are no suggestions for the entered text.
Declaration
public AutocompletePropertiesBuilder ShowEmptyResultText()
Returns
ShowEmptyResultText(Boolean)
Enables or disables showing the message when there are no suggestions for the entered text. An boolean variable 'showNoResults' is passed and by this this property is set to true.
Declaration
public AutocompletePropertiesBuilder ShowEmptyResultText(bool showNoResults)
Parameters
Type |
Name |
Description |
System.Boolean |
showNoResults |
|
Returns
ShowLoadingIcon()
Enables or disables 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 AutocompletePropertiesBuilder ShowLoadingIcon()
Returns
ShowLoadingIcon(Boolean)
Enables or disables the loading icon to intimate the searching operation. The loading icon is visible when there is a time delay to perform the search. A boolean variable 'showLoadingIcon' is passed as an argument. Its value is true.
Declaration
public AutocompletePropertiesBuilder ShowLoadingIcon(bool showLoadingIcon)
Parameters
Type |
Name |
Description |
System.Boolean |
showLoadingIcon |
|
Returns
Enables the showPopup button in autocomplete textbox. When the Showpopup button is clicked, it displays all the available data from the data source.
Declaration
public AutocompletePropertiesBuilder ShowPopupButton()
Returns
Enables the showPopup button in autocomplete textbox. When the Showpopup button is clicked, it displays all the available data from the data source. A variable named 'showPopupButton' is passed.
Declaration
public AutocompletePropertiesBuilder ShowPopupButton(bool showPopupButton)
Parameters
Type |
Name |
Description |
System.Boolean |
showPopupButton |
|
Returns
ShowResetIcon()
Enables the reset icon while searching
Declaration
public AutocompletePropertiesBuilder ShowResetIcon()
Returns
ShowResetIcon(Boolean)
Enables or disables reset icon to clear the textbox values.
Declaration
public AutocompletePropertiesBuilder ShowResetIcon(bool showResetIcon)
Parameters
Type |
Name |
Description |
System.Boolean |
showResetIcon |
|
Returns
ShowRoundedCorner()
Enables or disables rounded corner.
Declaration
public AutocompletePropertiesBuilder ShowRoundedCorner()
Returns
ShowRoundedCorner(Boolean)
Enables or disables rounded corner. The 'showRoundedCorner' argument is passed and its value is set as true.
Declaration
public AutocompletePropertiesBuilder ShowRoundedCorner(bool showRoundedCorner)
Parameters
Type |
Name |
Description |
System.Boolean |
showRoundedCorner |
|
Returns
SortOrder(SortOrder)
Sort order specifies whether the suggestion list values has to be displayed in ascending or descending order.
Declaration
public AutocompletePropertiesBuilder SortOrder(SortOrder sortOrder)
Parameters
Returns
Template(String)
The template to display the suggestion list items with customized appearance. A string variable 'template' is passed as an argument.
Declaration
public AutocompletePropertiesBuilder Template(string template)
Parameters
Type |
Name |
Description |
System.String |
template |
|
Returns
ToHtmlString()
Declaration
public string ToHtmlString()
Returns
Type |
Description |
System.String |
|
ValidationMessage(Action<AutocompleteValidationMessageBuilder>)
The jQuery validation error message to be displayed on form validation.
Declaration
public AutocompletePropertiesBuilder ValidationMessage(Action<AutocompleteValidationMessageBuilder> validationMessage)
Parameters
Returns
ValidationMessage(Dictionary<String, Object>)
The jQuery validation error message to be displayed on form validation.
Declaration
public AutocompletePropertiesBuilder ValidationMessage(Dictionary<string, object> validationMessage)
Parameters
Type |
Name |
Description |
System.Collections.Generic.Dictionary<System.String, System.Object> |
validationMessage |
|
Returns
ValidationRules(Action<AutocompleteValidationRuleBuilder>)
The jQuery validation rules for form validation.
Declaration
public AutocompletePropertiesBuilder ValidationRules(Action<AutocompleteValidationRuleBuilder> validationRule)
Parameters
Returns
ValidationRules(Dictionary<String, Object>)
The jQuery validation rules for form validation.
Declaration
public AutocompletePropertiesBuilder ValidationRules(Dictionary<string, object> validationRule)
Parameters
Type |
Name |
Description |
System.Collections.Generic.Dictionary<System.String, System.Object> |
validationRule |
|
Returns
Value(String)
The value to be displayed in the autocomplete textbox. A string argument 'value' is passed.
Declaration
public AutocompletePropertiesBuilder Value(string value)
Parameters
Type |
Name |
Description |
System.String |
value |
|
Returns
Visible(Boolean)
Enables or disables the visibility of the autocomplete textbox. An argument 'visible' is set as true.
Declaration
public AutocompletePropertiesBuilder Visible(bool visible)
Parameters
Type |
Name |
Description |
System.Boolean |
visible |
|
Returns
WatermarkText(String)
The text to be displayed when the value of the autocomplete textbox is empty. A string variable 'watermarkText' is passed as an argument.
Declaration
public AutocompletePropertiesBuilder WatermarkText(string watermarkText)
Parameters
Type |
Name |
Description |
System.String |
watermarkText |
|
Returns
Width(String)
The width of the Autocomplete textbox. A string argument 'width' is passed.
Declaration
public AutocompletePropertiesBuilder Width(string width)
Parameters
Type |
Name |
Description |
System.String |
width |
|
Returns
Implements
System.Web.IHtmlString