NumericTextBoxBuilder
Properties
WriteAction - Func
Methods
AutoAdjust(System.Boolean)
If this property is enabled and you have configured min and/or max values, and the user enters a value that falls out of that range, the value will automatically be set to either the minimum or maximum allowed value.
Parameters
value - System.Boolean
The value for AutoAdjust
Culture(System.String)
Specifies the culture info used by the widget.
Parameters
value - System.String
The value for Culture
Decimals(System.Int32)
Specifies the number precision applied to the widget value and when the NumericTextBox is focused. If not set, the precision defined by the current culture is used. If the user enters a number with a greater precision than is currently configured, the widget value will be rounded. For example, if decimals is 2 and the user inputs 12.346, the value will become 12.35. If decimals is 1 the user inputs 12.99, the value will become 13.00.Compare with the format property.
Parameters
value - System.Int32
The value for Decimals
DownArrowText(System.String)
Specifies the text of the tooltip on the down arrow.
Parameters
value - System.String
The value for DownArrowText
Factor(System.Double)
Specifies the factor by which the value is multiplied. The obtained result is used as edit value. So, if 15 as string is entered in the NumericTextBox and the factor value is set to 100 the visual value will be 1500. On blur the visual value will be divided by 100 thus scaling the widget value to the original proportion.
Parameters
value - System.Double
The value for Factor
Format(System.String)
Specifies the number format used when the widget is not focused. Any valid number format is allowed.Compare with the decimals property.
Parameters
value - System.String
The value for Format
Label(System.Action)
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.
Parameters
configurator - System.Action<NumericTextBoxLabelSettingsBuilder>
The configurator for the label setting.
Max(System.Nullable)
Specifies the largest value the user can enter.
Parameters
value - System.Nullable<T>
The value for Max
Min(System.Nullable)
Specifies the smallest value the user can enter.
Parameters
value - System.Nullable<T>
The value for Min
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
PrefixOptions(System.Action)
The configuration for the prefix adornment of the component.
Parameters
configurator - System.Action<NumericTextBoxPrefixOptionsSettingsBuilder>
The configurator for the prefixoptions setting.
RestrictDecimals(System.Boolean)
Specifies whether the decimals length should be restricted during typing. The length of the fraction is defined by the decimals value.
Parameters
value - System.Boolean
The value for RestrictDecimals
RestrictDecimals()
Specifies whether the decimals length should be restricted during typing. The length of the fraction is defined by the decimals value.
Round(System.Boolean)
Specifies whether the value should be rounded or truncated. The length of the fraction is defined by the decimals value.
Parameters
value - System.Boolean
The value for Round
SelectOnFocus(System.Boolean)
When set to true, the text of the input will be selected after the widget is focused.
Parameters
value - System.Boolean
The value for SelectOnFocus
SelectOnFocus()
When set to true, the text of the input will be selected after the widget is focused.
Spinners(System.Boolean)
Specifies whether the up and down spin buttons should be rendered
Parameters
value - System.Boolean
The value for Spinners
Step(System.Nullable)
Specifies the value used to increment or decrement widget value.
Parameters
value - System.Nullable<T>
The value for Step
SuffixOptions(System.Action)
The configuration for the suffix adornment of the component.
Parameters
configurator - System.Action<NumericTextBoxSuffixOptionsSettingsBuilder>
The configurator for the suffixoptions setting.
UpArrowText(System.String)
Specifies the text of the tooltip on the up arrow.
Parameters
value - System.String
The value for UpArrowText
Value(System.Nullable)
Specifies the value of the NumericTextBox widget.
Parameters
value - System.Nullable<T>
The value for Value
Enable(System.Boolean)
Enables or disables the textbox
Parameters
value - System.Boolean
The value for Enable
Size(Kendo.Mvc.UI.ComponentSize)
Sets the size of the component.
Parameters
value - ComponentSize
The value for Size
Rounded(Kendo.Mvc.UI.Rounded)
Sets a value controlling the border radius.
Parameters
value - Rounded
The value for Rounded
FillMode(Kendo.Mvc.UI.FillMode)
Sets a value controlling how the color is applied.
Parameters
value - FillMode
The value for FillMode
Events(System.Action)
Configures the client-side events.
Parameters
configurator - System.Action<NumericTextBoxEventBuilder>
The client events action.
Example
@(Html.Kendo().NumericTextBox()
.Name("NumericTextBox")
.Events(events => events
.Change("onChange")
)
)
UseMvvmInitialization(System.Boolean)
Specifies if the component should be initialized through MVVM on the client.
Parameters
value - System.Boolean
The value.
UseMvvmInitialization()
Specifies if the component should be initialized through MVVM on the client.
ToComponent()
Returns the internal view component.
Expression(System.String)
Sets the name of the component.
Parameters
modelExpression - System.String
Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)
Sets the name of the component.
Parameters
modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer
Name(System.String)
Sets the name of the component.
Parameters
componentName - System.String
The name.
Deferred(System.Boolean)
Suppress initialization script rendering. Note that this options should be used in conjunction with
Parameters
deferred - System.Boolean
HtmlAttributes(System.Object)
Sets the HTML attributes.
Parameters
attributes - System.Object
The HTML attributes.
HtmlAttributes(System.Collections.Generic.IDictionary)
Sets the HTML attributes.
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
The HTML attributes.
ScriptAttributes(System.Object,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Object
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.
ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.
Render()
Renders the component in place.
ToHtmlString()
WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)
Parameters
writer - System.IO.TextWriter
encoder - System.Text.Encodings.Web.HtmlEncoder
ToClientTemplate()
AsModule(System.Boolean)
Specifies whether the initialization script of the component will be rendered as a JavaScript module.