Class AutoCompleteBuilder
Inheritance
System.Object
AutoCompleteBuilder
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.EJ2.dll
Syntax
public class AutoCompleteBuilder : ControlBuilder
Constructors
AutoCompleteBuilder()
Declaration
public AutoCompleteBuilder()
AutoCompleteBuilder(AutoComplete)
Declaration
public AutoCompleteBuilder(AutoComplete model)
Parameters
Fields
model
Declaration
public AutoComplete model
Field Value
Properties
HtmlAttr
Declaration
public IDictionary<string, object> HtmlAttr { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.IDictionary<System.String, System.Object> |
|
ID
Declaration
public string ID { get; set; }
Property Value
Type |
Description |
System.String |
|
Output
Declaration
public override TextWriter Output { get; set; }
Property Value
Type |
Description |
System.IO.TextWriter |
|
Overrides
Methods
ActionBegin(String)
Triggers before fetching data from the remote server.
Declaration
public AutoCompleteBuilder ActionBegin(string actionBegin)
Parameters
Type |
Name |
Description |
System.String |
actionBegin |
|
Returns
ActionComplete(String)
Triggers after data is fetched successfully from the remote server.
Declaration
public AutoCompleteBuilder ActionComplete(string actionComplete)
Parameters
Type |
Name |
Description |
System.String |
actionComplete |
|
Returns
ActionFailure(String)
Triggers when the data fetch request from the remote server fails.
Declaration
public AutoCompleteBuilder ActionFailure(string actionFailure)
Parameters
Type |
Name |
Description |
System.String |
actionFailure |
|
Returns
ActionFailureTemplate(String)
Accepts the template and assigns it to the popup list content of the component
when the data fetch request from the remote server fails.
Declaration
public AutoCompleteBuilder ActionFailureTemplate(string actionFailureTemplate)
Parameters
Type |
Name |
Description |
System.String |
actionFailureTemplate |
|
Returns
AllowCustom(Boolean)
Specifies whether the component allows user defined value which does not exist in data source.
Declaration
public AutoCompleteBuilder AllowCustom(bool allowCustom = true)
Parameters
Type |
Name |
Description |
System.Boolean |
allowCustom |
|
Returns
Autofill(Boolean)
Specifies whether suggest a first matched item in input when searching. No action happens when no matches found.
Declaration
public AutoCompleteBuilder Autofill(bool autofill = true)
Parameters
Type |
Name |
Description |
System.Boolean |
autofill |
|
Returns
BeforeOpen(String)
Triggers when the popup before opens.
Declaration
public AutoCompleteBuilder BeforeOpen(string beforeOpen)
Parameters
Type |
Name |
Description |
System.String |
beforeOpen |
|
Returns
Blur(String)
Triggers when focus moves out from the component.
Declaration
public AutoCompleteBuilder Blur(string blur)
Parameters
Type |
Name |
Description |
System.String |
blur |
|
Returns
Change(String)
Declaration
public AutoCompleteBuilder Change(string change)
Parameters
Type |
Name |
Description |
System.String |
change |
|
Returns
Close(String)
Triggers when the popup is closed.
Declaration
public AutoCompleteBuilder Close(string close)
Parameters
Type |
Name |
Description |
System.String |
close |
|
Returns
Created(String)
Triggers when the component is created.
Declaration
public AutoCompleteBuilder Created(string created)
Parameters
Type |
Name |
Description |
System.String |
created |
|
Returns
CssClass(String)
Sets CSS classes to the root element of the component that allows customization of appearance.
Declaration
public AutoCompleteBuilder CssClass(string cssClass)
Parameters
Type |
Name |
Description |
System.String |
cssClass |
|
Returns
CustomValueSpecifier(String)
Declaration
public AutoCompleteBuilder CustomValueSpecifier(string customValueSpecifier)
Parameters
Type |
Name |
Description |
System.String |
customValueSpecifier |
|
Returns
DataBound(String)
Triggers when data source is populated in the popup list..
Declaration
public AutoCompleteBuilder DataBound(string dataBound)
Parameters
Type |
Name |
Description |
System.String |
dataBound |
|
Returns
DataSource(Action<DataManagerBuilder>)
Declaration
public AutoCompleteBuilder DataSource(Action<DataManagerBuilder> dataSource)
Parameters
Returns
DataSource(Double[])
Accepts the list items either through local or remote service and binds it to the component.
It can be an array of JSON Objects or an instance of
DataManager
.
Declaration
public AutoCompleteBuilder DataSource(double[] dataSource)
Parameters
Type |
Name |
Description |
System.Double[] |
dataSource |
|
Returns
DataSource(Object)
Accepts the list items either through local or remote service and binds it to the component.
It can be an array of JSON Objects or an instance of
DataManager
.
Declaration
public AutoCompleteBuilder DataSource(object dataSource)
Parameters
Type |
Name |
Description |
System.Object |
dataSource |
|
Returns
DataSource(String[])
Accepts the list items either through local or remote service and binds it to the component.
It can be an array of JSON Objects or an instance of
DataManager
.
Declaration
public AutoCompleteBuilder DataSource(string[] dataSource)
Parameters
Type |
Name |
Description |
System.String[] |
dataSource |
|
Returns
Destroyed(String)
Triggers when the component is destroyed.
Declaration
public AutoCompleteBuilder Destroyed(string destroyed)
Parameters
Type |
Name |
Description |
System.String |
destroyed |
|
Returns
Enabled(Boolean)
Specifies a value that indicates whether the component is enabled or not.
Declaration
public AutoCompleteBuilder Enabled(bool enabled = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enabled |
|
Returns
EnablePersistence(Boolean)
Enable or disable persisting component's state between page reloads.
If enabled, following list of states will be persisted.
- value
Declaration
public AutoCompleteBuilder EnablePersistence(bool enablePersistence = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enablePersistence |
|
Returns
EnableRtl(Boolean)
Enable or disable rendering component in right to left direction.
Declaration
public AutoCompleteBuilder EnableRtl(bool enableRtl = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableRtl |
|
Returns
Fields(AutoCompleteFieldSettings)
The fields
property maps the columns of the data table and binds the data to the component.
text - Maps the text column from data table for each list item
value - Maps the value column from data table for each list item
iconCss - Maps the icon class column from data table for each list item
groupBy - Group the list items with it's related items by mapping groupBy field
Declaration
public AutoCompleteBuilder Fields(AutoCompleteFieldSettings fields)
Parameters
Returns
Fields(Action<AutoCompleteFieldSettingsBuilder>)
Declaration
public AutoCompleteBuilder Fields(Action<AutoCompleteFieldSettingsBuilder> fields)
Parameters
Returns
Filtering(String)
Triggers on typing a character in the component.
Declaration
public AutoCompleteBuilder Filtering(string filtering)
Parameters
Type |
Name |
Description |
System.String |
filtering |
|
Returns
FilterType(FilterType)
Determines on which filter type, the component needs to be considered on search action.
The available FilterType
and its supported data types are
Declaration
public AutoCompleteBuilder FilterType(FilterType filterType)
Parameters
Returns
Specifies whether to display the floating label above the input element.
Possible values are:
Never: The label will never float in the input when the placeholder is available.
Always: The floating label will always float above the input.
Auto: The floating label will float above the input after focusing or entering a value in the input.
Declaration
public AutoCompleteBuilder FloatLabelType(FloatLabelType floatLabelType)
Parameters
Returns
Focus(String)
Triggers when the component is focused.
Declaration
public AutoCompleteBuilder Focus(string focus)
Parameters
Type |
Name |
Description |
System.String |
focus |
|
Returns
Accepts the template design and assigns it to the footer container of the popup list.
For more details about the available template options refer to Template
documentation.
Declaration
public AutoCompleteBuilder FooterTemplate(string footerTemplate)
Parameters
Type |
Name |
Description |
System.String |
footerTemplate |
|
Returns
GroupTemplate(String)
Accepts the template design and assigns it to the group headers present in the popup list.
Declaration
public AutoCompleteBuilder GroupTemplate(string groupTemplate)
Parameters
Type |
Name |
Description |
System.String |
groupTemplate |
|
Returns
Accepts the template design and assigns it to the header container of the popup list.
For more details about the available template options refer to Template
documentation.
Declaration
public AutoCompleteBuilder HeaderTemplate(string headerTemplate)
Parameters
Type |
Name |
Description |
System.String |
headerTemplate |
|
Returns
Highlight(Boolean)
When set to ‘true’, highlight the searched characters on suggested list items.
For more details about the highlight refer to Custom highlight search
documentation.
Declaration
public AutoCompleteBuilder Highlight(bool highlight = true)
Parameters
Type |
Name |
Description |
System.Boolean |
highlight |
|
Returns
HtmlAttributes(Object)
Allows additional HTML attributes such as title, name, etc., and
accepts n number of attributes in a key-value pair format.
Declaration
public AutoCompleteBuilder HtmlAttributes(object htmlAttributes)
Parameters
Type |
Name |
Description |
System.Object |
htmlAttributes |
|
Returns
IgnoreAccent(Boolean)
ignoreAccent set to true, then ignores the diacritic characters or accents when filtering.
Declaration
public AutoCompleteBuilder IgnoreAccent(bool ignoreAccent = true)
Parameters
Type |
Name |
Description |
System.Boolean |
ignoreAccent |
|
Returns
IgnoreCase(Boolean)
When set to ‘false’, consider the case-sensitive
on performing the search to find suggestions.
By default consider the casing.
Declaration
public AutoCompleteBuilder IgnoreCase(bool ignoreCase = true)
Parameters
Type |
Name |
Description |
System.Boolean |
ignoreCase |
|
Returns
ItemTemplate(String)
Accepts the template design and assigns it to each list item present in the popup.
We have built-in template engine
Declaration
public AutoCompleteBuilder ItemTemplate(string itemTemplate)
Parameters
Type |
Name |
Description |
System.String |
itemTemplate |
|
Returns
Locale(String)
Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
Declaration
public AutoCompleteBuilder Locale(string locale)
Parameters
Type |
Name |
Description |
System.String |
locale |
|
Returns
MinLength(Double)
Allows you to set [`the minimum search character length']
(../../auto-complete/filtering#limit-the-minimum-filter-character),
the search action will perform after typed minimum characters.
Declaration
public AutoCompleteBuilder MinLength(double minLength)
Parameters
Type |
Name |
Description |
System.Double |
minLength |
|
Returns
NoRecordsTemplate(String)
Accepts the template design and assigns it to popup list of component
when no data is available on the component.
Declaration
public AutoCompleteBuilder NoRecordsTemplate(string noRecordsTemplate)
Parameters
Type |
Name |
Description |
System.String |
noRecordsTemplate |
|
Returns
Open(String)
Triggers when the popup opens.
Declaration
public AutoCompleteBuilder Open(string open)
Parameters
Type |
Name |
Description |
System.String |
open |
|
Returns
Placeholder(String)
Specifies a short hint that describes the expected value of the DropDownList component.
Declaration
public AutoCompleteBuilder Placeholder(string placeholder)
Parameters
Type |
Name |
Description |
System.String |
placeholder |
|
Returns
Specifies the height of the popup list.
For more details about the popup configuration refer to
Popup Configuration
documentation.
Declaration
public AutoCompleteBuilder PopupHeight(string popupHeight)
Parameters
Type |
Name |
Description |
System.String |
popupHeight |
|
Returns
Specifies the width of the popup list. By default, the popup width sets based on the width of
the component.
For more details about the popup configuration refer to
Popup Configuration
documentation.
Declaration
public AutoCompleteBuilder PopupWidth(string popupWidth)
Parameters
Type |
Name |
Description |
System.String |
popupWidth |
|
Returns
Query(String)
Accepts the external query
that execute along with data processing.
Declaration
public AutoCompleteBuilder Query(string query)
Parameters
Type |
Name |
Description |
System.String |
query |
|
Returns
Readonly(Boolean)
Declaration
public AutoCompleteBuilder Readonly(bool readOnly = true)
Parameters
Type |
Name |
Description |
System.Boolean |
readOnly |
|
Returns
Render()
Declaration
public HtmlString Render()
Returns
Type |
Description |
System.Web.HtmlString |
|
Select(String)
Triggers when an item in the popup is selected by the user either with mouse/tap or with keyboard navigation.
Declaration
public AutoCompleteBuilder Select(string select)
Parameters
Type |
Name |
Description |
System.String |
select |
|
Returns
Specifies whether to show or hide the clear button.
When the clear button is clicked, value
, text
, and index
properties are reset to null.
Declaration
public AutoCompleteBuilder ShowClearButton(bool showClearButton = true)
Parameters
Type |
Name |
Description |
System.Boolean |
showClearButton |
|
Returns
Allows you to either show or hide the popup button on the component.
Declaration
public AutoCompleteBuilder ShowPopupButton(bool showPopupButton = true)
Parameters
Type |
Name |
Description |
System.Boolean |
showPopupButton |
|
Returns
SortOrder(Object)
Specifies the sortOrder
to sort the data source. The available type of sort orders are
None
- The data source is not sorting.
Ascending
- The data source is sorting with ascending order.
Descending
- The data source is sorting with descending order.
Declaration
public AutoCompleteBuilder SortOrder(object sortOrder)
Parameters
Type |
Name |
Description |
System.Object |
sortOrder |
|
Returns
SuggestionCount(Double)
Declaration
public AutoCompleteBuilder SuggestionCount(double suggestionCount)
Parameters
Type |
Name |
Description |
System.Double |
suggestionCount |
|
Returns
Value(Boolean)
Gets or sets the value of the selected item in the component.
Declaration
public AutoCompleteBuilder Value(bool value = true)
Parameters
Type |
Name |
Description |
System.Boolean |
value |
|
Returns
Value(Double)
Gets or sets the value of the selected item in the component.
Declaration
public AutoCompleteBuilder Value(double value)
Parameters
Type |
Name |
Description |
System.Double |
value |
|
Returns
Value(Object)
Gets or sets the value of the selected item in the component.
Declaration
public AutoCompleteBuilder Value(object value)
Parameters
Type |
Name |
Description |
System.Object |
value |
|
Returns
Value(String)
Gets or sets the value of the selected item in the component.
Declaration
public AutoCompleteBuilder Value(string value)
Parameters
Type |
Name |
Description |
System.String |
value |
|
Returns
Width(String)
Specifies the width of the component. By default, the component width sets based on the width of
its parent container. You can also set the width in pixel values.
Declaration
public AutoCompleteBuilder Width(string width)
Parameters
Type |
Name |
Description |
System.String |
width |
|
Returns
ZIndex(Double)
specifies the z-index value of the component popup element.
Declaration
public AutoCompleteBuilder ZIndex(double zIndex)
Parameters
Type |
Name |
Description |
System.Double |
zIndex |
|
Returns