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

Defines the fluent API for configuring the Kendo UI TextBox

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

T

Syntax:

C#
public class TextBoxBuilder<T> : MvvmWidgetBuilderBase<TextBox<T>, TextBoxBuilder<T>>, IHtmlContent

Inheritance: objectHelperResultWidgetBuilderBase<TextBox<T>, TextBoxBuilder<T>>MvvmWidgetBuilderBase<TextBox<T>, TextBoxBuilder<T>>TextBoxBuilder<T>

Implements: IHtmlContent

Inherited Members MvvmWidgetBuilderBase<TextBox<T>, TextBoxBuilder<T>>.UseMvvmInitialization(bool)MvvmWidgetBuilderBase<TextBox<T>, TextBoxBuilder<T>>.UseMvvmInitialization()WidgetBuilderBase<TextBox<T>, TextBoxBuilder<T>>.ToComponent()WidgetBuilderBase<TextBox<T>, TextBoxBuilder<T>>.Expression(string)WidgetBuilderBase<TextBox<T>, TextBoxBuilder<T>>.Explorer(ModelExplorer)WidgetBuilderBase<TextBox<T>, TextBoxBuilder<T>>.Name(string)WidgetBuilderBase<TextBox<T>, TextBoxBuilder<T>>.Deferred(bool)WidgetBuilderBase<TextBox<T>, TextBoxBuilder<T>>.HtmlAttributes(object)WidgetBuilderBase<TextBox<T>, TextBoxBuilder<T>>.HtmlAttributes(IDictionary<string, object>)WidgetBuilderBase<TextBox<T>, TextBoxBuilder<T>>.ScriptAttributes(object, bool)WidgetBuilderBase<TextBox<T>, TextBoxBuilder<T>>.ScriptAttributes(IDictionary<string, object>, bool)WidgetBuilderBase<TextBox<T>, TextBoxBuilder<T>>.Render()WidgetBuilderBase<TextBox<T>, TextBoxBuilder<T>>.ToHtmlString()WidgetBuilderBase<TextBox<T>, TextBoxBuilder<T>>.WriteTo(TextWriter, HtmlEncoder)WidgetBuilderBase<TextBox<T>, TextBoxBuilder<T>>.ToClientTemplate()WidgetBuilderBase<TextBox<T>, TextBoxBuilder<T>>.AsModule(bool)WidgetBuilderBase<TextBox<T>, TextBoxBuilder<T>>.ComponentWidgetBuilderBase<TextBox<T>, TextBoxBuilder<T>>.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 TextBoxBuilder<T> class.

C#
public TextBoxBuilder(TextBox<T> component)
Parameters:componentTextBox<T>

Methods

If set to true, will render a button that can be used to clear the value.

C#
public TextBoxBuilder<T> ClearButton()
Returns:

TextBoxBuilder<T>

Returns the current TextBoxBuilder<T> instance.

If set to true, will render a button that can be used to clear the value.

C#
public TextBoxBuilder<T> ClearButton(bool value)
Parameters:valuebool

The value for ClearButton

Returns:

TextBoxBuilder<T>

Returns the current TextBoxBuilder<T> 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 TextBoxBuilder<T> Enable(bool value)
Parameters:valuebool

The value for Enable

Returns:

TextBoxBuilder<T>

Returns the current TextBoxBuilder<T> instance.

Configures the client-side events.

C#
public TextBoxBuilder<T> Events(Action<TextBoxEventBuilder> configurator)
Parameters:configuratorAction<TextBoxEventBuilder>

The client events action.

Returns:

TextBoxBuilder<T>

Returns the current TextBoxBuilder<T> instance.

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

Sets a value controlling how the color is applied.

C#
public TextBoxBuilder<T> FillMode(FillMode value)
Parameters:valueFillMode

The value for FillMode

Returns:

TextBoxBuilder<T>

Returns the current TextBoxBuilder<T> 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 TextBoxBuilder<T> InputMode(string value)
Parameters:valuestring

The value for InputMode

Returns:

TextBoxBuilder<T>

Returns the current TextBoxBuilder<T> instance.

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 TextBoxBuilder<T> Label(Action<TextBoxLabelSettingsBuilder<T>> configurator)
Parameters:configuratorAction<TextBoxLabelSettingsBuilder<T>>

The TextBoxLabelSettingsBuilder<T> for the label setting.

Returns:

TextBoxBuilder<T>

Returns the current instance of TextBoxBuilder<T> .

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 TextBoxBuilder<T> Label(string label)
Parameters:labelstring

The label.

Returns:

TextBoxBuilder<T>

Returns the current instance of TextBoxBuilder<T> .

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

C#
public TextBoxBuilder<T> Placeholder(string value)
Parameters:valuestring

The value for Placeholder

Returns:

TextBoxBuilder<T>

Returns the current TextBoxBuilder<T> instance.

The configuration for the prefix adornment of the component.

C#
public TextBoxBuilder<T> PrefixOptions(Action<TextBoxPrefixOptionsSettingsBuilder<T>> configurator)
Parameters:configuratorAction<TextBoxPrefixOptionsSettingsBuilder<T>>

The TextBoxPrefixOptionsSettingsBuilder<T> for the prefixoptions setting.

Returns:

TextBoxBuilder<T>

Returns the current instance of TextBoxBuilder<T> .

If set to true, the widget will be readonly and will not allow user input. The widget is not readonly by default and allows user input.

C#
public TextBoxBuilder<T> Readonly()
Returns:

TextBoxBuilder<T>

Returns the current TextBoxBuilder<T> instance.

If set to true, the widget will be readonly and will not allow user input. The widget is not readonly by default and allows user input.

C#
public TextBoxBuilder<T> Readonly(bool value)
Parameters:valuebool

The value for Readonly

Returns:

TextBoxBuilder<T>

Returns the current TextBoxBuilder<T> instance.

Sets a value controlling the border radius.

C#
public TextBoxBuilder<T> Rounded(Rounded value)
Parameters:valueRounded

The value for Rounded

Returns:

TextBoxBuilder<T>

Returns the current TextBoxBuilder<T> instance.

Sets the size of the component.

C#
public TextBoxBuilder<T> Size(ComponentSize value)
Parameters:valueComponentSize

The value for Size

Returns:

TextBoxBuilder<T>

Returns the current TextBoxBuilder<T> instance.

The configuration for the suffix adornment of the component.

C#
public TextBoxBuilder<T> SuffixOptions(Action<TextBoxSuffixOptionsSettingsBuilder<T>> configurator)
Parameters:configuratorAction<TextBoxSuffixOptionsSettingsBuilder<T>>

The TextBoxSuffixOptionsSettingsBuilder<T> for the suffixoptions setting.

Returns:

TextBoxBuilder<T>

Returns the current instance of TextBoxBuilder<T> .

The value of the widget.

C#
public TextBoxBuilder<T> Value(string value)
Parameters:valuestring

The value for Value

Returns:

TextBoxBuilder<T>

Returns the current TextBoxBuilder<T> instance.