Class NumericTextBoxBuilder
Inheritance
System.Object
NumericTextBoxBuilder
Assembly: Syncfusion.EJ2.dll
Syntax
public class NumericTextBoxBuilder : ControlBuilder
Constructors
NumericTextBoxBuilder()
Declaration
public NumericTextBoxBuilder()
NumericTextBoxBuilder(NumericTextBox)
Declaration
public NumericTextBoxBuilder(NumericTextBox model)
Parameters
Fields
model
Declaration
public NumericTextBox 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
Blur(String)
Triggers when the NumericTextBox got focus out.
Declaration
public NumericTextBoxBuilder Blur(string blur)
Parameters
Type |
Name |
Description |
System.String |
blur |
|
Returns
Change(String)
Triggers when the value of the NumericTextBox changes.
Declaration
public NumericTextBoxBuilder Change(string change)
Parameters
Type |
Name |
Description |
System.String |
change |
|
Returns
Created(String)
Triggers when the NumericTextBox component is created.
Declaration
public NumericTextBoxBuilder Created(string created)
Parameters
Type |
Name |
Description |
System.String |
created |
|
Returns
CssClass(String)
Gets or Sets the CSS classes to root element of the NumericTextBox which helps to customize the
complete UI styles for the NumericTextBox component.
Declaration
public NumericTextBoxBuilder CssClass(string cssClass)
Parameters
Type |
Name |
Description |
System.String |
cssClass |
|
Returns
Currency(String)
Specifies the currency code to use in currency formatting.
Possible values are the ISO 4217 currency codes, such as 'USD' for the US dollar,'EUR' for the euro.
Declaration
public NumericTextBoxBuilder Currency(string currency)
Parameters
Type |
Name |
Description |
System.String |
currency |
|
Returns
Decimals(Double)
Specifies the number precision applied to the textbox value when the NumericTextBox is focused.
For more information on decimals, refer to
decimals.
Declaration
public NumericTextBoxBuilder Decimals(double decimals)
Parameters
Type |
Name |
Description |
System.Double |
decimals |
|
Returns
Destroyed(String)
Triggers when the NumericTextBox component is destroyed.
Declaration
public NumericTextBoxBuilder Destroyed(string destroyed)
Parameters
Type |
Name |
Description |
System.String |
destroyed |
|
Returns
Enabled(Boolean)
Sets a value that enables or disables the NumericTextBox control.
Declaration
public NumericTextBoxBuilder Enabled(bool enabled = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enabled |
|
Returns
EnablePersistence(Boolean)
Enable or disable persisting NumericTextBox state between page reloads. If enabled, the value
state will be persisted.
Declaration
public NumericTextBoxBuilder 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 NumericTextBoxBuilder EnableRtl(bool enableRtl = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableRtl |
|
Returns
FloatLabelType(FloatLabelType)
The acts as a label
and floats above the NumericTextBox based on the below values.
Possible values are:
Never
- Never floats the label in the NumericTextBox when the placeholder is available.
Always
- The floating label always floats above the NumericTextBox.
Auto
- The floating label floats above the NumericTextBox after focusing it or when enters the value in it.
Declaration
public NumericTextBoxBuilder FloatLabelType(FloatLabelType floatLabelType)
Parameters
Returns
Focus(String)
Triggers when the NumericTextBox got focus in.
Declaration
public NumericTextBoxBuilder Focus(string focus)
Parameters
Type |
Name |
Description |
System.String |
focus |
|
Returns
Format(String)
Specifies the number format that indicates the display format for the value of the NumericTextBox.
For more information on formats, refer to
formats.
Declaration
public NumericTextBoxBuilder Format(string format)
Parameters
Type |
Name |
Description |
System.String |
format |
|
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='numerictextbox/htmlAttributes/index.md' %}{% endcodeBlock %}
Declaration
public NumericTextBoxBuilder HtmlAttributes(object htmlAttributes)
Parameters
Type |
Name |
Description |
System.Object |
htmlAttributes |
|
Returns
Locale(String)
Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
Declaration
public NumericTextBoxBuilder Locale(string locale)
Parameters
Type |
Name |
Description |
System.String |
locale |
|
Returns
Max(Object)
Specifies a maximum value that is allowed a user can enter.
For more information on max, refer to
max.
Declaration
public NumericTextBoxBuilder Max(object max)
Parameters
Type |
Name |
Description |
System.Object |
max |
|
Returns
Min(Object)
Specifies a minimum value that is allowed a user can enter.
For more information on min, refer to
min.
Declaration
public NumericTextBoxBuilder Min(object min)
Parameters
Type |
Name |
Description |
System.Object |
min |
|
Returns
Placeholder(String)
Gets or sets the string shown as a hint/placeholder when the NumericTextBox is empty.
It acts as a label and floats above the NumericTextBox based on the
Declaration
public NumericTextBoxBuilder Placeholder(string placeholder)
Parameters
Type |
Name |
Description |
System.String |
placeholder |
|
Returns
Readonly(Boolean)
Declaration
public NumericTextBoxBuilder Readonly(bool readOnly = true)
Parameters
Type |
Name |
Description |
System.Boolean |
readOnly |
|
Returns
Render()
Declaration
public HtmlString Render()
Returns
Type |
Description |
Microsoft.AspNetCore.Html.HtmlString |
|
ShowClearButton(Boolean)
Specifies whether to show or hide the clear icon.
Declaration
public NumericTextBoxBuilder ShowClearButton(bool showClearButton = true)
Parameters
Type |
Name |
Description |
System.Boolean |
showClearButton |
|
Returns
ShowSpinButton(Boolean)
Specifies whether the up and down spin buttons should be displayed in NumericTextBox.
Declaration
public NumericTextBoxBuilder ShowSpinButton(bool showSpinButton = true)
Parameters
Type |
Name |
Description |
System.Boolean |
showSpinButton |
|
Returns
Step(Double)
Specifies the incremental or decremental step size for the NumericTextBox.
For more information on step, refer to
step.
Declaration
public NumericTextBoxBuilder Step(double step)
Parameters
Type |
Name |
Description |
System.Double |
step |
|
Returns
StrictMode(Boolean)
Specifies a value that indicates whether the NumericTextBox control allows the value for the specified range.
If it is true, the input value will be restricted between the min and max range.
The typed value gets modified to fit the range on focused out state.
Else, it allows any value even out of range value,
At that time of wrong value entered, the error class will be added to the component to highlight the error.
{% codeBlock src='numerictextbox/strictMode/index.md' %}{% endcodeBlock %}
Declaration
public NumericTextBoxBuilder StrictMode(bool strictMode = true)
Parameters
Type |
Name |
Description |
System.Boolean |
strictMode |
|
Returns
ValidateDecimalOnType(Boolean)
Specifies whether the decimals length should be restricted during typing.
Declaration
public NumericTextBoxBuilder ValidateDecimalOnType(bool validateDecimalOnType = true)
Parameters
Type |
Name |
Description |
System.Boolean |
validateDecimalOnType |
|
Returns
Value(Object)
Sets the value of the NumericTextBox.
Declaration
public NumericTextBoxBuilder Value(object value)
Parameters
Type |
Name |
Description |
System.Object |
value |
|
Returns
Width(Double)
Specifies the width of the NumericTextBox.
Declaration
public NumericTextBoxBuilder Width(double width)
Parameters
Type |
Name |
Description |
System.Double |
width |
|
Returns
Width(String)
Specifies the width of the NumericTextBox.
Declaration
public NumericTextBoxBuilder Width(string width)
Parameters
Type |
Name |
Description |
System.String |
width |
|
Returns