SliderBuilder
Methods
Value(System.Nullable)
Sets the value of the slider.
Parameters
value - System.Nullable<T>
The value of the component.
Example
@( Html.Kendo().Slider()
.Name("slider")
.Value(5)
)
DragHandleTitle(System.String)
Sets the title of the slider draghandle.
Parameters
title - System.String
The draghandle title text.
Example
@( Html.Kendo().Slider()
.Name("slider")
.DragHandleTitle("change value")
)
IncreaseButtonTitle(System.String)
Sets the title of the slider increase button.
Parameters
title - System.String
The increase button title text.
Example
@( Html.Kendo().Slider()
.Name("slider")
.IncreaseButtonTitle("up")
)
ShowButtons(System.Nullable)
Sets whether slider to be rendered with increase/decrease button.
Parameters
value - System.Nullable<Boolean>
The boolean value that controls the appearance of the increase and decrease buttons.
Example
@( Html.Kendo().Slider()
.Name("slider")
.ShowButtons(false)
)
DecreaseButtonTitle(System.String)
Sets the title of the slider decrease button.
Parameters
title - System.String
The decrease button title text.
Example
@( Html.Kendo().Slider()
.Name("slider")
.DecreaseButtonTitle("down")
)
Orientation(Kendo.Mvc.UI.SliderOrientation)
Sets orientation of the slider.
Parameters
orientation - SliderOrientation
The orientation value.
Example
@( Html.Kendo().Slider()
.Name("slider")
.Orientation(SliderOrientation.Horizontal)
)
TickPlacement(Kendo.Mvc.UI.SliderTickPlacement)
Sets a value indicating how to display the tick marks on the slider.
Parameters
tickPlacement - SliderTickPlacement
The tick placement value.
Example
@( Html.Kendo().Slider()
.Name("slider")
.TickPlacement(SliderTickPlacement.TopLeft)
)
Min(Kendo.Mvc.UI.Fluent.T)
Parameters
value - T
Max(Kendo.Mvc.UI.Fluent.T)
Parameters
value - T
SmallStep(Kendo.Mvc.UI.Fluent.T)
Parameters
value - T
LargeStep(Kendo.Mvc.UI.Fluent.T)
Parameters
value - T
Tooltip(System.Boolean)
Display tooltip while drag.
Parameters
value - System.Boolean
The boolean value that disables or enables the tooltip.
Example
@( Html.Kendo().Slider()
.Name("slider")
.Tooltip(false)
)
Tooltip(System.Action)
Use it to configure tooltip.
Parameters
action - System.Action<SliderTooltipBuilder>
Use builder to set different tooltip options.
Example
@( Html.Kendo().Slider()
.Name("Slider")
.Tooltip(tooltip => tooltip
.Enable(true)
.Format("{0:P}")
);
)
Events(System.Action)
Configures the client-side events.
Parameters
events - System.Action<SliderEventBuilder>
The client events action.
Example
@( Html.Kendo().Slider()
.Name("Slider")
.Events(events =>
events.OnChange("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
@(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
@(@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.