New to Telerik UI for ASP.NET MVC? Download free 30-day trial

DrawerBuilder

Methods

AutoCollapse(System.Boolean)

Specifies if the Drawer will be automatically collapsed when an item is clicked.

Parameters

value - System.Boolean

The value that configures the autocollapse.

Expanded(System.Boolean)

Specifies if the Drawer will be expanded by default.

Parameters

value - System.Boolean

The value that configures the expanded property.

Example


            @(Html.Kendo().Drawer()
                    .Name("drawer")
                    .Expanded(true)
            )

Position(System.String)

The position of the drawer. Can be left (default) or right.

Parameters

value - System.String

The value that configures the position.

Mode(System.String)

Determines how the Kendo UI Drawer will interact with the associated content. The default one (overlay) will simply overlap the associated content with overlay effect. On the other hand "push" mode will show the drawer next to associated cotent. The associated content will shrink its content.

Parameters

value - System.String

The value that configures the mode.

If set to true the use could navigate the widget using the keyboard navigation. By default keyboard navigation is disabled.

Parameters

value - System.Boolean

The value that configures the navigatable.

Template(System.String)

Specifies the drawer's content.

Parameters

value - System.String

The value that configures the template.

TemplateId(System.String)

Specifies the drawer's content.

Parameters

value - System.String

The value that configures the template.

TemplateView(System.Web.Mvc.MvcHtmlString)

Specifies the drawer's content.

Parameters

value - System.Web.Mvc.MvcHtmlString

The value that configures the template.

TemplateHandler(System.String)

Specifies the drawer's content.

Parameters

value - System.String

The value that configures the template.

Template(Kendo.Mvc.UI.TemplateBuilder)

Specifies the drawer's content.

Parameters

template - TemplateBuilder<TModel>

A Template component that configures the template.

MinHeight(System.Double)

Specifies the minimum height for the drawer in push mode. The overlay mode takes 100% of the page height.

Parameters

value - System.Double

The value that configures the minheight.

Mini(System.Boolean)

Enables or configures the mini mode for the Kendo UI Drawer. This is a compact view that is displayed when the Kendo UI Drawer is collapsed. Usually it used to show only the icons when the drawer content contains icon and text for an item. When set to true it uses the main template.

Parameters

enabled - System.Boolean

Enables or disables the mini option.

Mini(System.Action)

Enables or configures the mini mode for the Kendo UI Drawer. This is a compact view that is displayed when the Kendo UI Drawer is collapsed. Usually it used to show only the icons when the drawer content contains icon and text for an item. When set to true it uses the main template.

Parameters

configurator - System.Action<DrawerMiniSettingsBuilder>

The action that configures the mini.

SwipeToOpen(System.Boolean)

If set to false, swiping the associated content will not activate the drawer. In this case, the drawer will only be open by calling the show method. should be disabled for browsers, which use side swiping gestures for back/forward navigation, such as iOS Safari. Otherwise, users should swipe from an inner part of the view, and not from the view edge.

Parameters

value - System.Boolean

The value that configures the swipetoopen.

Width(System.Double)

Defines a specific width for the Kendo UI Drawer when expanded.

Parameters

value - System.Double

The value that configures the width.

Content(System.Action)

The HTML string representing the associated content for the Drawer widget.

Parameters

value - System.Action

The value for the associated content.

Content(System.Func)

The HTML string representing the associated content for the Drawer widget.

Parameters

value - System.Func<Object,Object>

The value for the associated content.

Content(System.String)

The HTML string representing the associated content for the Drawer widget.

Parameters

value - System.String

The value for the associated content.

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<DrawerEventBuilder>

The client events action.

Example


             @( Html.Kendo().Drawer()
                        .Name("Drawer")
                        .Events(events => events
                            .Hide("onHide")
                        )
            )

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 Kendo.Mvc.UI.Fluent.WidgetFactory.DeferredScripts(System.Boolean)

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>

AsChildComponent()

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();
            )

ToHtmlString()

ToClientTemplate()

In this article
Not finding the help you need?