New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Defines the fluent API for configuring the Telerik UI for ASP.NET Core AutoComplete

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class AutoCompleteBuilder : MvvmWidgetBuilderBase<AutoComplete, AutoCompleteBuilder>, IHtmlContent

Inheritance: objectHelperResultWidgetBuilderBase<AutoComplete, AutoCompleteBuilder>MvvmWidgetBuilderBase<AutoComplete, AutoCompleteBuilder>AutoCompleteBuilder

Implements: IHtmlContent

Inherited Members MvvmWidgetBuilderBase<AutoComplete, AutoCompleteBuilder>.UseMvvmInitialization(bool)MvvmWidgetBuilderBase<AutoComplete, AutoCompleteBuilder>.UseMvvmInitialization()WidgetBuilderBase<AutoComplete, AutoCompleteBuilder>.ToComponent()WidgetBuilderBase<AutoComplete, AutoCompleteBuilder>.Expression(string)WidgetBuilderBase<AutoComplete, AutoCompleteBuilder>.Explorer(ModelExplorer)WidgetBuilderBase<AutoComplete, AutoCompleteBuilder>.Name(string)WidgetBuilderBase<AutoComplete, AutoCompleteBuilder>.Deferred(bool)WidgetBuilderBase<AutoComplete, AutoCompleteBuilder>.HtmlAttributes(object)WidgetBuilderBase<AutoComplete, AutoCompleteBuilder>.HtmlAttributes(IDictionary<string, object>)WidgetBuilderBase<AutoComplete, AutoCompleteBuilder>.ScriptAttributes(object, bool)WidgetBuilderBase<AutoComplete, AutoCompleteBuilder>.ScriptAttributes(IDictionary<string, object>, bool)WidgetBuilderBase<AutoComplete, AutoCompleteBuilder>.Render()WidgetBuilderBase<AutoComplete, AutoCompleteBuilder>.ToHtmlString()WidgetBuilderBase<AutoComplete, AutoCompleteBuilder>.WriteTo(TextWriter, HtmlEncoder)WidgetBuilderBase<AutoComplete, AutoCompleteBuilder>.ToClientTemplate()WidgetBuilderBase<AutoComplete, AutoCompleteBuilder>.AsModule(bool)WidgetBuilderBase<AutoComplete, AutoCompleteBuilder>.ComponentWidgetBuilderBase<AutoComplete, AutoCompleteBuilder>.ContainerHelperResult.WriteTo(TextWriter, HtmlEncoder)HelperResult.WriteActionobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

Initializes a new instance of the AutoCompleteBuilder class.

C#
public AutoCompleteBuilder(AutoComplete component)
Parameters:componentAutoComplete

Methods

Specifies the adaptive rendering of the component.

C#
public AutoCompleteBuilder AdaptiveMode(AdaptiveMode value)
Parameters:valueAdaptiveMode

The value for AdaptiveMode

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Allows customization of the subtitle's text in the adaptive view of the component.

C#
public AutoCompleteBuilder AdaptiveSubtitle(string value)
Parameters:valuestring

The value for AdaptiveSubtitle

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Allows customization of the title's text in the adaptive view of the component.

C#
public AutoCompleteBuilder AdaptiveTitle(string value)
Parameters:valuestring

The value for AdaptiveTitle

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Configures the opening and closing animations of the suggestion popup.

C#
public AutoCompleteBuilder Animation(Action<PopupAnimationBuilder> animationAction)
Parameters:animationActionAction<PopupAnimationBuilder>

The action that configures the popup animation effects.

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Example:
C#
@( Html.Kendo().AutoComplete()
.Name("AutoComplete")
.Animation(animation =&gt; animation
.Open(open =&gt; open.SlideIn(SlideDirection.Down))
.Close(close =&gt; close.Zoom(ZoomDirection.Out))
)
)

Configures the opening and closing animations of the suggestion popup.

C#
public AutoCompleteBuilder Animation(bool enable)
Parameters:enablebool

The boolean value.

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Example:
C#
@( Html.Kendo().AutoComplete()
.Name("AutoComplete")
.Animation(false)
)

If set to true, the widget automatically adjusts the width of the popup element and does not wrap up the item label.

C#
public AutoCompleteBuilder AutoWidth(bool value)
Parameters:valuebool

The value for AutoWidth

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Example:
C#
@(Html.Kendo().AutoComplete()
.Name("AutoComplete")
.AutoWidth(true)
)

Binds the component to an IEnumerable collection.

C#
public AutoCompleteBuilder BindTo(IEnumerable data)
Parameters:dataIEnumerable

The IEnumerable collection.

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Example:
C#
@(Html.Kendo().AutoComplete()
.Name("AutoComplete")
.DataTextField("CompanyName")
.BindTo(new List&lt;Company&gt;
{
new Company { CompanyName = "Text1" },
new Company { CompanyName = "Text2" }
}))

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.

C#
public AutoCompleteBuilder ClearButton(bool value)
Parameters:valuebool

The value for ClearButton

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Example:
C#
@(Html.Kendo().AutoComplete()
.Name("AutoComplete")
.ClearButton(false) // Disable the clear button.
)

Sets the DataSource configuration of the AutoComplete for remote data binding.

C#
public AutoCompleteBuilder DataSource(Action<ReadOnlyDataSourceBuilder> configurator)
Parameters:configuratorAction<ReadOnlyDataSourceBuilder>

The action that configures the DataSource.

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Example:
C#
@(Html.Kendo().AutoComplete()
.Name("AutoComplete")
.DataTextField("ProductName")
.DataSource(source =&gt;
{
source.Read(read =&gt;
{
read.Action("GetAutoCompleteData", "Home");
})
.ServerFiltering(false);
})
)

Sets a standalone DataSource Component as a data source of the AutoComplete for remote data binding.

C#
public AutoCompleteBuilder DataSource(string dataSourceId)
Parameters:dataSourceIdstring

The name of the DataSource Component.

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Example:
C#
@(Html.Kendo().AutoComplete()
.Name("AutoComplete")
.DataTextField("ProductName")
.DataSource("dataSource1")
)

@(Html.Kendo().DataSource&lt;ProductViewModel&gt;()
.Name("dataSource1")
.Ajax(dataSource =&gt; dataSource
.Read(read =&gt; read.Action("Products_Read", "DataSource"))
.ServerOperation(false)
.PageSize(20)
)
)

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.

C#
public AutoCompleteBuilder DataTextField(string value)
Parameters:valuestring

The value for DataTextField

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

The delay in milliseconds between a keystroke and when the widget displays the suggestion popup.

C#
public AutoCompleteBuilder Delay(double value)
Parameters:valuedouble

The value for Delay

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

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.

C#
public AutoCompleteBuilder Enable(bool value)
Parameters:valuebool

The value for Enable

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

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.

C#
public AutoCompleteBuilder EnforceMinLength()
Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

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.

C#
public AutoCompleteBuilder EnforceMinLength(bool value)
Parameters:valuebool

The value for EnforceMinLength

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Example:
C#
@(Html.Kendo().AutoComplete()
.Name("AutoComplete")
.EnforceMinLength(true)
)

Configures the client-side events.

C#
public AutoCompleteBuilder Events(Action<AutoCompleteEventBuilder> configurator)
Parameters:configuratorAction<AutoCompleteEventBuilder>

The client events action.

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Example:
C#
@(Html.Kendo().AutoComplete()
.Name("AutoComplete")
.Events(events =&gt; events
.Change("onChange")
)
)

Sets a value controlling how the color is applied.

C#
public AutoCompleteBuilder FillMode(FillMode value)
Parameters:valueFillMode

The value for FillMode

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Example:
C#
@(Html.Kendo().AutoComplete()
.Name("AutoComplete")
.FillMode(FillMode.Solid)
)

The filtering method used to determine the suggestions for the current value.

C#
public AutoCompleteBuilder Filter(FilterType value)
Parameters:valueFilterType

The value for Filter

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Example:
C#
@(Html.Kendo().AutoComplete()
.Name("AutoComplete")
.Filter(FilterType.Contains)
)

The template used to render the fixed header group. By default the widget displays only the value of the current group.

C#
public AutoCompleteBuilder FixedGroupTemplate(string value)
Parameters:valuestring

The value for FixedGroupTemplate

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

The template used to render the fixed header group. By default the widget displays only the value of the current group.

C#
public AutoCompleteBuilder FixedGroupTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the fixedgrouptemplate.

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

The template used to render the fixed header group. By default the widget displays only the value of the current group.

C#
public AutoCompleteBuilder FixedGroupTemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The handler that returs the template for FixedGroupTemplate

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

The template used to render the fixed header group. By default the widget displays only the value of the current group.

C#
public AutoCompleteBuilder FixedGroupTemplateId(string templateId)
Parameters:templateIdstring

The ID of the template element for FixedGroupTemplate

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

The template used to render the fixed header group. By default the widget displays only the value of the current group.

C#
public AutoCompleteBuilder FixedGroupTemplateView(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The view that contains the template for FixedGroupTemplate

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

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.

C#
public AutoCompleteBuilder FooterTemplate(string value)
Parameters:valuestring

The value for FooterTemplate

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

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.

C#
public AutoCompleteBuilder FooterTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the footertemplate.

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

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.

C#
public AutoCompleteBuilder FooterTemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The handler that returs the template for FooterTemplate

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

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.

C#
public AutoCompleteBuilder FooterTemplateId(string templateId)
Parameters:templateIdstring

The ID of the template element for FooterTemplate

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

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.

C#
public AutoCompleteBuilder FooterTemplateView(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The view that contains the template for FooterTemplate

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

The template used to render the groups. By default the widget displays only the value of the group.

C#
public AutoCompleteBuilder GroupTemplate(string value)
Parameters:valuestring

The value for GroupTemplate

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

The template used to render the groups. By default the widget displays only the value of the group.

C#
public AutoCompleteBuilder GroupTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the grouptemplate.

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

The template used to render the groups. By default the widget displays only the value of the group.

C#
public AutoCompleteBuilder GroupTemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The handler that returs the template for GroupTemplate

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

The template used to render the groups. By default the widget displays only the value of the group.

C#
public AutoCompleteBuilder GroupTemplateId(string templateId)
Parameters:templateIdstring

The ID of the template element for GroupTemplate

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

The template used to render the groups. By default the widget displays only the value of the group.

C#
public AutoCompleteBuilder GroupTemplateView(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The view that contains the template for GroupTemplate

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Specifies a static HTML content, which will be rendered as a header of the popup element.

C#
public AutoCompleteBuilder HeaderTemplate(string value)
Parameters:valuestring

The value for HeaderTemplate

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Specifies a static HTML content, which will be rendered as a header of the popup element.

C#
public AutoCompleteBuilder HeaderTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the headertemplate.

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Specifies a static HTML content, which will be rendered as a header of the popup element.

C#
public AutoCompleteBuilder HeaderTemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The handler that returs the template for HeaderTemplate

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Specifies a static HTML content, which will be rendered as a header of the popup element.

C#
public AutoCompleteBuilder HeaderTemplateId(string templateId)
Parameters:templateIdstring

The ID of the template element for HeaderTemplate

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Specifies a static HTML content, which will be rendered as a header of the popup element.

C#
public AutoCompleteBuilder HeaderTemplateView(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The view that contains the template for HeaderTemplate

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

The height of the suggestion popup in pixels. The default value is 200 pixels.

C#
public AutoCompleteBuilder Height(double value)
Parameters:valuedouble

The value for Height

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

If set to true the first suggestion will be automatically highlighted.

C#
public AutoCompleteBuilder HighlightFirst()
Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

If set to true the first suggestion will be automatically highlighted.

C#
public AutoCompleteBuilder HighlightFirst(bool value)
Parameters:valuebool

The value for HighlightFirst

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Example:
C#
@(Html.Kendo().AutoComplete()
.Name("AutoComplete")
.HighlightFirst(true)
)

If set to false case-sensitive search will be performed to find suggestions. The widget performs case-insensitive searching by default.

C#
public AutoCompleteBuilder IgnoreCase(bool value)
Parameters:valuebool

The value for IgnoreCase

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Specifies the inputmode attribute of the inner <input /> element. It is used to specify the type of on-screen keyboard that should be displayed when the user focuses the input.

C#
public AutoCompleteBuilder InputMode(string value)
Parameters:valuestring

The value for InputMode

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Example:
C#
@(Html.Kendo().AutoComplete()
.Name("autoComplete")
.InputMode("search")
)

Adds a label before the input. If the input has no id attribute, a generated id will be assigned. The string and the function parameters are setting the inner HTML of the label.

C#
public AutoCompleteBuilder Label(Action<AutoCompleteLabelSettingsBuilder> configurator)
Parameters:configuratorAction<AutoCompleteLabelSettingsBuilder>

The AutoCompleteLabelSettingsBuilder for the label setting.

Returns:

AutoCompleteBuilder

Returns the current instance of AutoCompleteBuilder .

Adds a label before the input. If the input has no id attribute, a generated id will be assigned. The string and the function parameters are setting the inner HTML of the label.

C#
public AutoCompleteBuilder Label(string label)
Parameters:labelstring

The label.

Returns:

AutoCompleteBuilder

Returns the current instance of AutoCompleteBuilder .

The text messages displayed in the widget. Use this option to customize or localize the messages.

C#
public AutoCompleteBuilder Messages(Action<AutoCompleteMessagesSettingsBuilder> configurator)
Parameters:configuratorAction<AutoCompleteMessagesSettingsBuilder>

The AutoCompleteMessagesSettingsBuilder for the messages setting.

Returns:

AutoCompleteBuilder

Returns the current instance of AutoCompleteBuilder .

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.

C#
public AutoCompleteBuilder MinLength(double value)
Parameters:valuedouble

The value for MinLength

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Example:
C#
@(Html.Kendo().AutoComplete()
.Name("AutoComplete")
.MinLength(3)
)

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.

C#
public AutoCompleteBuilder NoDataTemplate(string value)
Parameters:valuestring

The value for NoDataTemplate

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

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.

C#
public AutoCompleteBuilder NoDataTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the nodatatemplate.

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

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.

C#
public AutoCompleteBuilder NoDataTemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The handler that returs the template for NoDataTemplate

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

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.

C#
public AutoCompleteBuilder NoDataTemplateId(string templateId)
Parameters:templateIdstring

The ID of the template element for NoDataTemplate

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

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.

C#
public AutoCompleteBuilder NoDataTemplateView(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The view that contains the template for NoDataTemplate

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

The hint displayed by the widget when it is empty. Not set by default.

C#
public AutoCompleteBuilder Placeholder(string value)
Parameters:valuestring

The value for Placeholder

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Example:
C#
@(Html.Kendo().AutoComplete()
.Name("AutoComplete")
.Placeholder("Type a customer name...")
)

The options that will be used for the popup initialization. For more details about the available options refer to Popup documentation.

C#
public AutoCompleteBuilder Popup(Action<AutoCompletePopupSettingsBuilder> configurator)
Parameters:configuratorAction<AutoCompletePopupSettingsBuilder>

The configurator for the popup setting.

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

The configuration for the prefix adornment of the component.

C#
public AutoCompleteBuilder PrefixOptions(Action<AutoCompletePrefixOptionsSettingsBuilder> configurator)
Parameters:configuratorAction<AutoCompletePrefixOptionsSettingsBuilder>

The AutoCompletePrefixOptionsSettingsBuilder for the prefixoptions setting.

Returns:

AutoCompleteBuilder

Returns the current instance of AutoCompleteBuilder .

Sets a value controlling the border radius.

C#
public AutoCompleteBuilder Rounded(Rounded value)
Parameters:valueRounded

The value for Rounded

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Example:
C#
@(Html.Kendo().AutoComplete()
.Name("AutoComplete")
.Rounded(Rounded.Full)
)

The character used to separate multiple values. Empty by default.

C#
public AutoCompleteBuilder Separator(string value)
Parameters:valuestring

The value for Separator

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Example:
C#
@(Html.Kendo().AutoComplete()
.Name("AutoComplete")
.Separator(new string[2] {", ", ": " })
)

The character used to separate multiple values. Empty by default. All separators will be replaced with the first array item, which acts as a default separator. Using the separator option will still bind the primitive stringe value of the input. In case you need to bind multiple data items, you can consider the MultiSelect component.

C#
public AutoCompleteBuilder Separator(string[] value)
Parameters:valuestring[]

The values for the separators.

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Example:
C#
@(Html.Kendo().AutoComplete()
.Name("AutoComplete")
.Separator(new string[] { ", ", "; "})
)

Sets the size of the component.

C#
public AutoCompleteBuilder Size(ComponentSize value)
Parameters:valueComponentSize

The value for Size

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Example:
C#
@(Html.Kendo().AutoComplete()
.Name("AutoComplete")
.Size(ComponentSize.Large)
)

The configuration for the suffix adornment of the component.

C#
public AutoCompleteBuilder SuffixOptions(Action<AutoCompleteSuffixOptionsSettingsBuilder> configurator)
Parameters:configuratorAction<AutoCompleteSuffixOptionsSettingsBuilder>

The AutoCompleteSuffixOptionsSettingsBuilder for the suffixoptions setting.

Returns:

AutoCompleteBuilder

Returns the current instance of AutoCompleteBuilder .

If set to true the widget will automatically use the first suggestion as its value.

C#
public AutoCompleteBuilder Suggest()
Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

If set to true the widget will automatically use the first suggestion as its value.

C#
public AutoCompleteBuilder Suggest(bool value)
Parameters:valuebool

The value for Suggest

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

Example:
C#
@(Html.Kendo().AutoComplete()
.Name("AutoComplete")
.Suggest(true)
)

The template used to render the suggestions. By default the widget displays only the text of the suggestion (configured via dataTextField).

C#
public AutoCompleteBuilder Template(string value)
Parameters:valuestring

The value for Template

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

The template used to render the suggestions. By default the widget displays only the text of the suggestion (configured via dataTextField).

C#
public AutoCompleteBuilder Template<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the template.

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

The template used to render the suggestions. By default the widget displays only the text of the suggestion (configured via dataTextField).

C#
public AutoCompleteBuilder TemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The handler that returs the template for Template

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

The template used to render the suggestions. By default the widget displays only the text of the suggestion (configured via dataTextField).

C#
public AutoCompleteBuilder TemplateId(string templateId)
Parameters:templateIdstring

The ID of the template element for Template

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

The template used to render the suggestions. By default the widget displays only the text of the suggestion (configured via dataTextField).

C#
public AutoCompleteBuilder TemplateView(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The view that contains the template for Template

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

The value of the widget.

C#
public AutoCompleteBuilder Value(string value)
Parameters:valuestring

The value for Value

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

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.

C#
public AutoCompleteBuilder ValuePrimitive()
Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

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.

C#
public AutoCompleteBuilder ValuePrimitive(bool value)
Parameters:valuebool

The value for ValuePrimitive

Returns:

AutoCompleteBuilder

Returns the current AutoCompleteBuilder instance.

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.

C#
public AutoCompleteBuilder Virtual()
Returns:

AutoCompleteBuilder

Returns the current instance of 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.

C#
public AutoCompleteBuilder Virtual(Action<AutoCompleteVirtualSettingsBuilder> configurator)
Parameters:configuratorAction<AutoCompleteVirtualSettingsBuilder>

The AutoCompleteVirtualSettingsBuilder for the virtual setting.

Returns:

AutoCompleteBuilder

Returns the current instance of AutoCompleteBuilder .

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.

C#
public AutoCompleteBuilder Virtual(bool enabled)
Parameters:enabledbool

Enables or disables the virtual option.

Returns:

AutoCompleteBuilder

Returns the current instance of AutoCompleteVirtualSettingsBuilder .