Kendo.Mvc.UI.Fluent.AutoCompleteBuilder
Defines the fluent API for configuring the Kendo UI AutoComplete
Methods
Animation(System.Boolean)
Use to enable or disable animation of the popup element.
Parameters
enable System.Boolean
The boolean value.
Example (ASPX)
<%= Html.Kendo().AutoComplete()
.Name("AutoComplete")
.Animation(false) //toggle effect
%>
Animation(System.Action<Kendo.Mvc.UI.Fluent.PopupAnimationBuilder>)
Configures the animation effects of the widget.
Parameters
animationAction System.Action<Kendo.Mvc.UI.Fluent.PopupAnimationBuilder>
The action which configures the animation effects.
Example (ASPX)
<%= Html.Kendo().AutoComplete()
.Name("AutoComplete")
.Animation(animation =>
{
animation.Open(open =>
{
open.SlideIn(SlideDirection.Down);
});
})
%>
BindTo(System.Collections.IEnumerable)
Binds the widget to an IEnumerable list.
Parameters
data System.Collections.IEnumerable
The data source.
Example (ASPX)
<%= Html.Kendo().AutoComplete()
.Name("AutoComplete")
.DataTextField("CompanyName")
.DataValueField("CompanyID")
.BindTo(new List<Company>
{
new Company {
CompanyName = "Text1",
CompanyID = "Value1"
},
new Company {
CompanyName = "Text2",
CompanyID = "Value2"
}
})
%>
Filter(System.String)
The filtering method used to determine the suggestions for the current value. The default filter is "startswith" - all data items which begin with the current widget value are displayed in the suggestion popup. The supported filter values are startswith, endswith and contains.
Parameters
value System.String
The value for Filter
DataSource(System.Action<Kendo.Mvc.UI.Fluent.ReadOnlyDataSourceBuilder>)
Sets the data source configuration of the AutoComplete.
Parameters
configurator System.Action<Kendo.Mvc.UI.Fluent.ReadOnlyDataSourceBuilder>
The lambda which configures the data source
Separator(System.String[])
The character used to separate multiple values. Empty by default.
Parameters
value System.String[]
The values for Separator
AutoWidth(System.Boolean)
If set to true, the widget automatically adjusts the width of the popup element and does not wrap up the item label.
Parameters
value System.Boolean
The value for AutoWidth
ClearButton(System.Boolean)
Unless this options is set to false, a button will appear when hovering the widget. Clicking that button will reset the widget's value and will trigger the change event.
Parameters
value System.Boolean
The value for ClearButton
DataTextField(System.String)
The field of the data item used when searching for suggestions. This is the text that will be displayed in the list of matched results.
Parameters
value System.String
The value for DataTextField
Delay(System.Double)
The delay in milliseconds between a keystroke and when the widget displays the suggestion popup.
Parameters
value System.Double
The value for Delay
Enable(System.Boolean)
If set to false the widget will be disabled and will not allow user input. The widget is enabled by default and allows user input.
Parameters
value System.Boolean
The value for Enable
EnforceMinLength(System.Boolean)
If set to true the widget will not show all items when the text of the search input cleared. By default the widget shows all items when the text of the search input is cleared. Works in conjunction with minLength.
Parameters
value System.Boolean
The value for EnforceMinLength
EnforceMinLength
If set to true the widget will not show all items when the text of the search input cleared. By default the widget shows all items when the text of the search input is cleared. Works in conjunction with minLength.
FixedGroupTemplate(System.String)
The template used to render the fixed header group. By default the widget displays only the value of the current group.
Parameters
value System.String
The value for FixedGroupTemplate
FixedGroupTemplateId(System.String)
The template used to render the fixed header group. By default the widget displays only the value of the current group.
Parameters
templateId System.String
The ID of the template element for FixedGroupTemplate
FooterTemplate(System.String)
The template used to render the footer template. The footer template receives the widget itself as a part of the data argument. Use the widget fields directly in the template.
Parameters
value System.String
The value for FooterTemplate
FooterTemplateId(System.String)
The template used to render the footer template. The footer template receives the widget itself as a part of the data argument. Use the widget fields directly in the template.
Parameters
templateId System.String
The ID of the template element for FooterTemplate
GroupTemplate(System.String)
The template used to render the groups. By default the widget displays only the value of the group.
Parameters
value System.String
The value for GroupTemplate
GroupTemplateId(System.String)
The template used to render the groups. By default the widget displays only the value of the group.
Parameters
templateId System.String
The ID of the template element for GroupTemplate
Height(System.Double)
The height of the suggestion popup in pixels. The default value is 200 pixels.
Parameters
value System.Double
The value for Height
HighlightFirst(System.Boolean)
If set to true the first suggestion will be automatically highlighted.
Parameters
value System.Boolean
The value for HighlightFirst
HighlightFirst
If set to true the first suggestion will be automatically highlighted.
IgnoreCase(System.Boolean)
If set to false case-sensitive search will be performed to find suggestions. The widget performs case-insensitive searching by default.
Parameters
value System.Boolean
The value for IgnoreCase
Messages(System.Action<Kendo.Mvc.UI.Fluent.AutoCompleteMessagesSettingsBuilder>)
The text messages displayed in the widget. Use this option to customize or localize the messages.
Parameters
configurator System.Action<Kendo.Mvc.UI.Fluent.AutoCompleteMessagesSettingsBuilder>
The configurator for the messages setting.
MinLength(System.Double)
The minimum number of characters the user must type before a search is performed. Set to higher value than 1 if the search could match a lot of items.
Parameters
value System.Double
The value for MinLength
NoDataTemplate(System.String)
The template used to render the "no data" template, which will be displayed if no results are found or the underlying data source is empty. The noData template receives the widget itself as a part of the data argument. The template will be evaluated on every widget data bound.
Parameters
value System.String
The value for NoDataTemplate
NoDataTemplateId(System.String)
The template used to render the "no data" template, which will be displayed if no results are found or the underlying data source is empty. The noData template receives the widget itself as a part of the data argument. The template will be evaluated on every widget data bound.
Parameters
templateId System.String
The ID of the template element for NoDataTemplate
Placeholder(System.String)
The hint displayed by the widget when it is empty. Not set by default.
Parameters
value System.String
The value for Placeholder
Separator(System.String)
The character used to separate multiple values. Empty by default.
Parameters
value System.String
The value for Separator
Suggest(System.Boolean)
If set to true the widget will automatically use the first suggestion as its value.
Parameters
value System.Boolean
The value for Suggest
Suggest
If set to true the widget will automatically use the first suggestion as its value.
HeaderTemplate(System.String)
Specifies a static HTML content, which will be rendered as a header of the popup element.
Parameters
value System.String
The value for HeaderTemplate
HeaderTemplateId(System.String)
Specifies a static HTML content, which will be rendered as a header of the popup element.
Parameters
templateId System.String
The ID of the template element for HeaderTemplate
Template(System.String)
The template used to render the suggestions. By default the widget displays only the text of the suggestion (configured via dataTextField).
Parameters
value System.String
The value for Template
TemplateId(System.String)
The template used to render the suggestions. By default the widget displays only the text of the suggestion (configured via dataTextField).
Parameters
templateId System.String
The ID of the template element for Template
Value(System.String)
The value of the widget.
Parameters
value System.String
The value for Value
ValuePrimitive(System.Boolean)
Specifies the value binding behavior for the widget when the initial model value is null. If set to true, the View-Model field will be updated with the selected item text field. If set to false, the View-Model field will be updated with the selected item.
Parameters
value System.Boolean
The value for ValuePrimitive
ValuePrimitive
Specifies the value binding behavior for the widget when the initial model value is null. If set to true, the View-Model field will be updated with the selected item text field. If set to false, the View-Model field will be updated with the selected item.
Virtual(System.Action<Kendo.Mvc.UI.Fluent.AutoCompleteVirtualSettingsBuilder>)
Enables the virtualization feature of the widget. The configuration can be set on an object, which contains two properties - itemHeight and valueMapper.For detailed information, refer to the article on virtualization.
Parameters
configurator System.Action<Kendo.Mvc.UI.Fluent.AutoCompleteVirtualSettingsBuilder>
The configurator for the virtual setting.
Virtual
Enables the virtualization feature of the widget. The configuration can be set on an object, which contains two properties - itemHeight and valueMapper.For detailed information, refer to the article on virtualization.
Virtual(System.Boolean)
Enables the virtualization feature of the widget. The configuration can be set on an object, which contains two properties - itemHeight and valueMapper.For detailed information, refer to the article on virtualization.
Parameters
enabled System.Boolean
Enables or disables the virtual option.
Filter(Kendo.Mvc.UI.FilterType)
The filtering method used to determine the suggestions for the current value.
Parameters
value Kendo.Mvc.UI.FilterType
The value for Filter
Size(Kendo.Mvc.UI.ComponentSize)
Sets the size of the component.
Parameters
value Kendo.Mvc.UI.ComponentSize
The value for Size
Rounded(Kendo.Mvc.UI.Rounded)
Sets a value controlling the border radius.
Parameters
value Kendo.Mvc.UI.Rounded
The value for Rounded
FillMode(Kendo.Mvc.UI.FillMode)
Sets a value controlling how the color is applied.
Parameters
value Kendo.Mvc.UI.FillMode
The value for FillMode
Events(System.Action<Kendo.Mvc.UI.Fluent.AutoCompleteEventBuilder>)
Configures the client-side events.
Parameters
configurator System.Action<Kendo.Mvc.UI.Fluent.AutoCompleteEventBuilder>
The client events action.
Example (ASPX)
@(Html.Kendo().AutoComplete()
.Name("AutoComplete")
.Events(events => events
.Change("onChange")
)
)