OTPInputBuilder
Properties
WriteAction - Func
Methods
Items(System.Int32)
Parameters
length - System.Int32
InputMode(System.String)
Sets the appearance of the keyboard for a devices with a virtual keyboard
Parameters
value - System.String
The value for InputMode
Enable(System.Boolean)
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.
Parameters
value - System.Boolean
The value for Enable
Readonly(System.Boolean)
If set to false, the user will be will unable to enter values within the inputs. The widget is non-readonly by default and allows user input.
Parameters
value - System.Boolean
The value for Readonly
Readonly()
If set to false, the user will be will unable to enter values within the inputs. The widget is non-readonly by default and allows user input.
Space(System.Boolean)
If set to true, each of the input groups will not be concatenated with one another.
Parameters
value - System.Boolean
The value for Space
Space()
If set to true, each of the input groups will not be concatenated with one another.
Separator(System.String)
Adds a separator for each of the input groups.
Parameters
value - System.String
The value for Separator
SeparatorHandler(System.String)
Adds a separator for each of the input groups.
Parameters
handler - System.String
The name of the JavaScript function that will be evaluated.
SeparatorHandler(System.Func)
Adds a separator for each of the input groups.
Parameters
handler - System.Func<Object,Object>
The handler code wrapped in a text tag.
Items(System.Action)
Sets the Otp Input's items configuration.
Parameters
configurator - System.Action<OTPInputItemFactory>
The configurator for the items setting.
Placeholder(System.String)
The hint displayed by the widget when the inputs are empty. Not set by default.
Parameters
value - System.String
The value for Placeholder
Value(System.String)
The value of the widget.
Parameters
value - System.String
The value for Value
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
Type(Kendo.Mvc.UI.OTPType)
Sets a value which will dictate the type of the component.
Parameters
value - OTPType
The value for Type
Events(System.Action)
Configures the client-side events.
Parameters
configurator - System.Action<OTPInputEventBuilder>
The client events action.
Example
@(Html.Kendo().OTPInput()
.Name("OTPInput")
.Events(events => events
.Change("onChange")
)
)
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.