DropDownButtonBuilder

Properties

WriteAction - Func

Methods

Text(System.String)

Sets the text content of the button.

Parameters

value - System.String

The value for text content.

RETURNS

Returns the current instance of DropDownButtonBuilder to allow method chaining.

Example

Razor
 
                @(Html.Kendo().DropDownButton()
                  .Name("dropdownbutton")
                  .Text("Paste")
                )
             

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 for Enabled

RETURNS

Returns the current DropDownButtonBuilder instance.

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 for Icon

RETURNS

Returns the current DropDownButtonBuilder instance.

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 for IconClass

RETURNS

Returns the current DropDownButtonBuilder instance.

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 for ImageUrl

RETURNS

Returns the current DropDownButtonBuilder instance.

Items(System.Action)

Specifies the menu buttons of the DropDownButton.

Parameters

configurator - System.Action<DropDownButtonItemFactory>

The configurator for the items setting.

RETURNS

Returns the current instance of DropDownButtonBuilder .

ItemTemplate(System.String)

Specifies a custom template for the menu items.

Parameters

value - System.String

The value for ItemTemplate

RETURNS

Returns the current DropDownButtonBuilder instance.

ItemTemplateId(System.String)

Specifies a custom template for the menu items.

Parameters

templateId - System.String

The ID of the template element for ItemTemplate

RETURNS

Returns the current DropDownButtonBuilder instance.

ItemTemplateView(Microsoft.AspNetCore.Html.IHtmlContent)

Specifies a custom template for the menu items.

Parameters

templateView - Microsoft.AspNetCore.Html.IHtmlContent

The view that contains the template for ItemTemplate

RETURNS

Returns the current DropDownButtonBuilder instance.

ItemTemplateHandler(System.String)

Specifies a custom template for the menu items.

Parameters

templateHandler - System.String

The handler that returs the template for ItemTemplate

RETURNS

Returns the current DropDownButtonBuilder instance.

ItemTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)

Specifies a custom template for the menu items.

Parameters

template - TemplateBuilder<TModel>

A Template component that configures the itemtemplate.

RETURNS

Returns the current DropDownButtonBuilder instance.

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 configurator for the popup setting.

RETURNS

Returns the current instance of DropDownButtonBuilder .

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 for SpriteCssClass

RETURNS

Returns the current DropDownButtonBuilder instance.

ShowArrowButton(System.Boolean)

Configures the DropDownButton to render a down arrow that opens and closes its popup.

Parameters

value - System.Boolean

The value for ShowArrowButton

RETURNS

Returns the current DropDownButtonBuilder instance.

ShowArrowButton()

Configures the DropDownButton to render a down arrow that opens and closes its popup.

RETURNS

Returns the current DropDownButtonBuilder instance.

Messages(System.Action)

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

Parameters

configurator - System.Action<DropDownButtonMessagesSettingsBuilder>

The configurator for the messages setting.

RETURNS

Returns the current instance of DropDownButtonBuilder .

Size(Kendo.Mvc.UI.ComponentSize)

Sets the size of the component.

Parameters

value - ComponentSize

The value for Size

RETURNS

Returns the current DropDownButtonBuilder instance.

Rounded(Kendo.Mvc.UI.Rounded)

Sets a value controlling the border radius.

Parameters

value - Rounded

The value for Rounded

RETURNS

Returns the current DropDownButtonBuilder instance.

FillMode(Kendo.Mvc.UI.FillMode)

Sets a value controlling how the color is applied.

Parameters

value - FillMode

The value for FillMode

RETURNS

Returns the current DropDownButtonBuilder instance.

ThemeColor(Kendo.Mvc.UI.ThemeColor)

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

Parameters

value - ThemeColor

The value for ThemeColor

RETURNS

Returns the current DropDownButtonBuilder instance.

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<DropDownButtonEventBuilder>

The client events action.

RETURNS

Returns the current DropDownButtonBuilder instance.

Example

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

ToComponent()

Returns the internal view component.

RETURNS

The instance that represents the component.

Expression(System.String)

Sets the name of the component.

Parameters

modelExpression - System.String

RETURNS

Returns the current instance.

Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)

Sets the name of the component.

Parameters

modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer

RETURNS

Returns the current instance.

Name(System.String)

Sets the name of the component.

Parameters

componentName - System.String

The name.

RETURNS

Returns the current instance.

Deferred(System.Boolean)

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

Parameters

deferred - System.Boolean

RETURNS

Returns a DeferredWidgetBuilder instance.

HtmlAttributes(System.Object)

Sets the HTML attributes.

Parameters

attributes - System.Object

The HTML attributes.

RETURNS

Returns the current instance.

HtmlAttributes(System.Collections.Generic.IDictionary)

Sets the HTML attributes.

Parameters

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

The HTML attributes.

RETURNS

Returns the current instance.

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.

RETURNS

Returns the current instance.

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.

RETURNS

Returns the current instance.

Render()

Renders the component in place.

ToHtmlString()

Returns the HTML representation of the component.

WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)

Parameters

writer - System.IO.TextWriter
encoder - System.Text.Encodings.Web.HtmlEncoder

ToClientTemplate()

Returns the client template for the component.

AsModule(System.Boolean)

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

Parameters

value - System.Boolean

RETURNS

Returns the current instance.