OTPInputBuilder

Methods

InputMode(System.String)

Sets the appearance of the keyboard for a devices with a virtual keyboard

Parameters

value - System.String

The value that configures the 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 that configures the 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 that configures the readonly.

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 that configures the space.

Separator(System.String)

Adds a separator for each of the input groups.

Parameters

value - System.String

The value that configures the separator.

Items(System.Action)

Sets the Otp Input's items configuration.

Parameters

configurator - System.Action<OTPInputItemFactory>

The action that configures the items.

Placeholder(System.String)

The hint displayed by the widget when the inputs are empty. Not set by default.

Parameters

value - System.String

The value that configures the placeholder.

Value(System.String)

The value of the widget.

Parameters

value - System.String

The value that configures the value.

Size(Kendo.Mvc.UI.ComponentSize)

Sets the size of the component.

Parameters

value - ComponentSize

The value that configures the size.

Rounded(Kendo.Mvc.UI.Rounded)

Sets a value controlling the border radius.

Parameters

value - Rounded

The value that configures the rounded.

FillMode(Kendo.Mvc.UI.FillMode)

Sets a value controlling how the color is applied.

Parameters

value - FillMode

The value that configures the fillmode.

Type(Kendo.Mvc.UI.OTPType)

Sets a value which will dictate the type of the component.

Parameters

value - OTPType

The value that configures the type.

Items(System.Int32)

Parameters

length - System.Int32

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.

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<OTPInputEventBuilder>

The client events action.

Example

Razor
 
            @(Html.Kendo().OTPInput()
                        .Name("OTPInput")
                        .Events(events => events
                            .Change("onChange")
                        )
            )
             

ToComponent()

Returns the internal view component.

Name(System.String)

Sets the name of the component.

Parameters

componentName - System.String

The name of the component.

Example

Razor
 
            @(Html.Kendo().Grid<OrderViewModel>()
               .Name("grid")
               .Columns(columns =>
               {
                   columns.Bound(p => p.OrderID).Filterable(false);
                   columns.Bound(p => p.Freight);
               })
               .DataSource(dataSource => dataSource
                   .Ajax()
                   .PageSize(20)
                   .Read(read => read.Action("Orders_Read", "Grid"))
               )
            )
             

Deferred(System.Boolean)

Suppress initialization script rendering. Note that this options should be used in conjunction with

Parameters

deferred - System.Boolean

ModelMetadata(System.Web.Mvc.ModelMetadata)

Uses the Metadata of the Model.

Parameters

modelMetadata - System.Web.Mvc.ModelMetadata

The metadata set for the Model

HtmlAttributes(System.Object)

Sets the HTML attributes.

Parameters

attributes - System.Object

The HTML attributes.

HtmlAttributes(System.Collections.Generic.IDictionary)

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

AsModule(System.Boolean)

Specifies whether the initialization script of the component will be rendered as a JavaScript module.

Parameters

value - System.Boolean

Render()

Renders the component.

Example

Razor
 
            @(@Page Inherits="System.Web.Mvc.ViewPage<IEnumerable<Product>>" )
            @( Html.Kendo().Grid(Model)
                .Name("grid")
                .DetailTemplate(product => {
                    )
                       Product Details:
                       <div>Product Name: @( product.ProductName )</div>
                       <div>Units In Stock: @( product.UnitsInStock )</div>
                    @(
                })
                .Render();
            )
             

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.

ToHtmlString()

ToClientTemplate()