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

DropDownButtonBuilder

Methods

Enabled(System.Boolean)

Indicates whether the DropDownButton should be enabled or disabled. By default, it is enabled, unless a disabled="disabled" attribute is detected.

Parameters

value - System.Boolean

The value that configures the enabled.

Icon(System.String)

Defines a name of an existing icon in the Kendo UI theme sprite. The icon will be applied as background image of a span element inside the DropDownButton. The span element can be added automatically by the widget, or an existing element can be used, if it has a k-icon CSS class applied. For a list of available icon names, please refer to the Icons demo.

Parameters

value - System.String

The value that configures the icon.

IconClass(System.String)

Defines a CSS class - or multiple classes separated by spaced - which are applied to a span element inside the DropDownButton. Allows the usage of custom icons.

Parameters

value - System.String

The value that configures the iconclass.

ImageUrl(System.String)

Defines a URL, which will be used for an img element inside the DropDownButton. The URL can be relative or absolute. In case it is relative, it will be evaluated with relation to the web page URL.The img element can be added automatically by the widget, or an existing element can be used, if it has a k-image CSS class applied.

Parameters

value - System.String

The value that configures the imageurl.

Items(System.Action)

Specifies the menu buttons of the DropDownButton.

Parameters

configurator - System.Action<DropDownButtonItemFactory>

The action that configures the items.

ItemTemplate(System.String)

Specifies a custom template for the menu items.

Parameters

value - System.String

The value that configures the itemtemplate.

ItemTemplateId(System.String)

Specifies a custom template for the menu items.

Parameters

value - System.String

The value that configures the itemtemplate.

ItemTemplateView(System.Web.Mvc.MvcHtmlString)

Specifies a custom template for the menu items.

Parameters

value - System.Web.Mvc.MvcHtmlString

The value that configures the itemtemplate.

ItemTemplateHandler(System.String)

Specifies a custom template for the menu items.

Parameters

value - System.String

The value that configures the itemtemplate.

ItemTemplate(Kendo.Mvc.UI.TemplateBuilder)

Specifies a custom template for the menu items.

Parameters

template - TemplateBuilder<TModel>

A Template component that configures the itemtemplate.

Popup(System.Action)

The options that will be used for the popup initialization. For more details about the available options refer to Popup documentation.

Parameters

configurator - System.Action<DropDownButtonPopupSettingsBuilder>

The action that configures the popup.

SpriteCssClass(System.String)

Defines a CSS class (or multiple classes separated by spaces), which will be used for applying a background image to a span element inside the DropDownButton. In case you want to use an icon from the Kendo UI theme sprite background image, it is easier to use the icon property.The span element can be added automatically by the widget, or an existing element can be used, if it has a k-sprite CSS class applied.

Parameters

value - System.String

The value that configures the spritecssclass.

Messages(System.Action)

Allows localization of the strings that are used in the widget.

Parameters

configurator - System.Action<DropDownButtonMessagesSettingsBuilder>

The action that configures the messages.

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.

ThemeColor(Kendo.Mvc.UI.ThemeColor)

Sets the color of the component according to the applied theme.

Parameters

value - ThemeColor

The value that configures the themecolor.

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<DropDownButtonEventBuilder>

The client events action.

Example


             @( Html.Kendo().DropDownButton()
                        .Name("DropDownButton")
                        .Events(events => events
                            .Click("onClick")
                        )
            )

Text(System.String)

Sets the text content of the button.

Parameters

value - System.String

The value for text content.

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?