Class TextBoxBuilder
Inheritance
System.Object
TextBoxBuilder
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 TextBoxBuilder : ControlBuilder
Constructors
TextBoxBuilder()
Declaration
TextBoxBuilder(TextBox)
Declaration
public TextBoxBuilder(TextBox model)
Parameters
Type |
Name |
Description |
TextBox |
model |
|
Fields
model
Declaration
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
Autocomplete(String)
Specifies whether the browser is allow to automatically enter or select a value for the textbox.
By default, autocomplete is enabled for textbox.
Possible values are:
on
- Specifies that autocomplete is enabled.
off
- Specifies that autocomplete is disabled.
Declaration
public TextBoxBuilder Autocomplete(string autocomplete)
Parameters
Type |
Name |
Description |
System.String |
autocomplete |
|
Returns
Blur(String)
Triggers when the TextBox has focus-out.
Declaration
public TextBoxBuilder Blur(string blur)
Parameters
Type |
Name |
Description |
System.String |
blur |
|
Returns
Change(String)
Triggers when the content of TextBox has changed and gets focus-out.
Declaration
public TextBoxBuilder Change(string change)
Parameters
Type |
Name |
Description |
System.String |
change |
|
Returns
Created(String)
Triggers when the TextBox component is created.
Declaration
public TextBoxBuilder Created(string created)
Parameters
Type |
Name |
Description |
System.String |
created |
|
Returns
CssClass(String)
Specifies the CSS class value that is appended to wrapper of Textbox.
Declaration
public TextBoxBuilder CssClass(string cssClass)
Parameters
Type |
Name |
Description |
System.String |
cssClass |
|
Returns
Destroyed(String)
Triggers when the TextBox component is destroyed.
Declaration
public TextBoxBuilder Destroyed(string destroyed)
Parameters
Type |
Name |
Description |
System.String |
destroyed |
|
Returns
Enabled(Boolean)
Specifies a Boolean value that indicates whether the TextBox allow user to interact with it.
Declaration
public TextBoxBuilder Enabled(bool enabled = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enabled |
|
Returns
EnablePersistence(Boolean)
Enable or disable persisting TextBox state between page reloads. If enabled, the value
state will be persisted.
Declaration
public TextBoxBuilder 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 TextBoxBuilder EnableRtl(bool enableRtl = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableRtl |
|
Returns
FloatLabelType(FloatLabelType)
Specifies the floating label behavior of the TextBox that the placeholder text floats above the TextBox based on the below values.
Possible values are:
Never
- The placeholder text should not be float ever.
Always
- The placeholder text floats above the TextBox always.
Auto
- The placeholder text floats above the TextBox while focusing or enter a value in Textbox.
Declaration
public TextBoxBuilder FloatLabelType(FloatLabelType floatLabelType)
Parameters
Returns
Focus(String)
Triggers when the TextBox gets focus.
Declaration
public TextBoxBuilder Focus(string focus)
Parameters
Type |
Name |
Description |
System.String |
focus |
|
Returns
HtmlAttributes(Object)
You can add the additional html attributes such as disabled, value etc., to the element.
If you configured both property and equivalent html attribute then the component considers the property value.
{% codeBlock src='textbox/htmlAttributes/index.md' %}{% endcodeBlock %}
Declaration
public TextBoxBuilder HtmlAttributes(object htmlAttributes)
Parameters
Type |
Name |
Description |
System.Object |
htmlAttributes |
|
Returns
Input(String)
Triggers each time when the value of TextBox has changed.
Declaration
public TextBoxBuilder Input(string input)
Parameters
Type |
Name |
Description |
System.String |
input |
|
Returns
Locale(String)
Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
Declaration
public TextBoxBuilder Locale(string locale)
Parameters
Type |
Name |
Description |
System.String |
locale |
|
Returns
Multiline(Boolean)
Specifies a boolean value that enable or disable the multiline on the TextBox.
The TextBox changes from single line to multiline when enable this multiline mode.
Declaration
public TextBoxBuilder Multiline(bool multiline = true)
Parameters
Type |
Name |
Description |
System.Boolean |
multiline |
|
Returns
Placeholder(String)
Specifies the text that is shown as a hint/placeholder until the user focus or enter a value in Textbox.
The property is depending on the floatLabelType property.
Declaration
public TextBoxBuilder Placeholder(string placeholder)
Parameters
Type |
Name |
Description |
System.String |
placeholder |
|
Returns
Readonly(Boolean)
Declaration
public TextBoxBuilder Readonly(bool readOnly = true)
Parameters
Type |
Name |
Description |
System.Boolean |
readOnly |
|
Returns
Render()
Declaration
public HtmlString Render()
Returns
Type |
Description |
System.Web.HtmlString |
|
ShowClearButton(Boolean)
Specifies a Boolean value that indicates whether the clear button is displayed in Textbox.
Declaration
public TextBoxBuilder ShowClearButton(bool showClearButton = true)
Parameters
Type |
Name |
Description |
System.Boolean |
showClearButton |
|
Returns
Type(String)
Specifies the behavior of the TextBox such as text, password, email, etc.
Declaration
public TextBoxBuilder Type(string type)
Parameters
Type |
Name |
Description |
System.String |
type |
|
Returns
Value(String)
Sets the content of the TextBox.
Declaration
public TextBoxBuilder Value(string value)
Parameters
Type |
Name |
Description |
System.String |
value |
|
Returns
Width(Double)
Specifies the width of the Textbox component.
Declaration
public TextBoxBuilder Width(double width)
Parameters
Type |
Name |
Description |
System.Double |
width |
|
Returns
Width(String)
Specifies the width of the Textbox component.
Declaration
public TextBoxBuilder Width(string width)
Parameters
Type |
Name |
Description |
System.String |
width |
|
Returns