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

Defines the fluent API for configuring the Kendo DropDownButton for ASP.NET MVC.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class DropDownButtonBuilder : WidgetBuilderBase<DropDownButton, DropDownButtonBuilder>, IHtmlString

Inheritance: objectWidgetBuilderBase<DropDownButton, DropDownButtonBuilder>DropDownButtonBuilder

Implements: IHtmlString

Inherited Members WidgetBuilderBase<DropDownButton, DropDownButtonBuilder>.ToComponent()WidgetBuilderBase<DropDownButton, DropDownButtonBuilder>.Name(string)WidgetBuilderBase<DropDownButton, DropDownButtonBuilder>.Deferred(bool)WidgetBuilderBase<DropDownButton, DropDownButtonBuilder>.ModelMetadata(ModelMetadata)WidgetBuilderBase<DropDownButton, DropDownButtonBuilder>.HtmlAttributes(object)WidgetBuilderBase<DropDownButton, DropDownButtonBuilder>.HtmlAttributes(IDictionary<string, object>)WidgetBuilderBase<DropDownButton, DropDownButtonBuilder>.AsModule(bool)WidgetBuilderBase<DropDownButton, DropDownButtonBuilder>.Render()WidgetBuilderBase<DropDownButton, DropDownButtonBuilder>.ScriptAttributes(object, bool)WidgetBuilderBase<DropDownButton, DropDownButtonBuilder>.ScriptAttributes(IDictionary<string, object>, bool)WidgetBuilderBase<DropDownButton, DropDownButtonBuilder>.ToHtmlString()WidgetBuilderBase<DropDownButton, DropDownButtonBuilder>.ToClientTemplate()WidgetBuilderBase<DropDownButton, DropDownButtonBuilder>.ToString()WidgetBuilderBase<DropDownButton, DropDownButtonBuilder>.Componentobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

Initializes a new instance of the DropDownButton class.

C#
public DropDownButtonBuilder(DropDownButton component)
Parameters:componentDropDownButton

The component.

Methods

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

C#
public DropDownButtonBuilder Enabled(bool value)
Parameters:valuebool

The value that configures the enabled.

Returns:

DropDownButtonBuilder

Configures the client-side events.

C#
public DropDownButtonBuilder Events(Action<DropDownButtonEventBuilder> configurator)
Parameters:configuratorAction<DropDownButtonEventBuilder>

The client events action.

Returns:

DropDownButtonBuilder

Example:
C#
@( Html.Kendo().DropDownButton()
.Name("DropDownButton")
.Events(events =&gt; events
.Click("onClick")
)
)

Sets a value controlling how the color is applied.

C#
public DropDownButtonBuilder FillMode(FillMode value)
Parameters:valueFillMode

The value that configures the fillmode.

Returns:

DropDownButtonBuilder

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.

C#
public DropDownButtonBuilder Icon(string value)
Parameters:valuestring

The value that configures the icon.

Returns:

DropDownButtonBuilder

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.

C#
public DropDownButtonBuilder IconClass(string value)
Parameters:valuestring

The value that configures the iconclass.

Returns:

DropDownButtonBuilder

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.

C#
public DropDownButtonBuilder ImageUrl(string value)
Parameters:valuestring

The value that configures the imageurl.

Returns:

DropDownButtonBuilder

Specifies the menu buttons of the DropDownButton.

C#
public DropDownButtonBuilder Items(Action<DropDownButtonItemFactory> configurator)
Parameters:configuratorAction<DropDownButtonItemFactory>

The action that configures the items.

Returns:

DropDownButtonBuilder

Specifies a custom template for the menu items.

C#
public DropDownButtonBuilder ItemTemplate(string value)
Parameters:valuestring

The value that configures the itemtemplate.

Returns:

DropDownButtonBuilder

Specifies a custom template for the menu items.

C#
public DropDownButtonBuilder ItemTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the itemtemplate.

Returns:

DropDownButtonBuilder

Specifies a custom template for the menu items.

C#
public DropDownButtonBuilder ItemTemplateHandler(string value)
Parameters:valuestring

The value that configures the itemtemplate.

Returns:

DropDownButtonBuilder

Specifies a custom template for the menu items.

C#
public DropDownButtonBuilder ItemTemplateId(string value)
Parameters:valuestring

The value that configures the itemtemplate.

Returns:

DropDownButtonBuilder

Specifies a custom template for the menu items.

C#
public DropDownButtonBuilder ItemTemplateView(MvcHtmlString value)
Parameters:valueMvcHtmlString

The value that configures the itemtemplate.

Returns:

DropDownButtonBuilder

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

C#
public DropDownButtonBuilder Messages(Action<DropDownButtonMessagesSettingsBuilder> configurator)
Parameters:configuratorAction<DropDownButtonMessagesSettingsBuilder>

The action that configures the messages.

Returns:

DropDownButtonBuilder

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

C#
public DropDownButtonBuilder Popup(Action<DropDownButtonPopupSettingsBuilder> configurator)
Parameters:configuratorAction<DropDownButtonPopupSettingsBuilder>

The action that configures the popup.

Returns:

DropDownButtonBuilder

Sets a value controlling the border radius.

C#
public DropDownButtonBuilder Rounded(Rounded value)
Parameters:valueRounded

The value that configures the rounded.

Returns:

DropDownButtonBuilder

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

C#
public DropDownButtonBuilder ShowArrowButton(bool value)
Parameters:valuebool

The value that configures the showarrowbutton.

Returns:

DropDownButtonBuilder

Sets the size of the component.

C#
public DropDownButtonBuilder Size(ComponentSize value)
Parameters:valueComponentSize

The value that configures the size.

Returns:

DropDownButtonBuilder

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.

C#
public DropDownButtonBuilder SpriteCssClass(string value)
Parameters:valuestring

The value that configures the spritecssclass.

Returns:

DropDownButtonBuilder

Sets the text content of the button.

C#
public DropDownButtonBuilder Text(string value)
Parameters:valuestring

The value for text content.

Returns:

DropDownButtonBuilder

Example:
C#
@(Html.Kendo().DropDownButton()
.Name("dropdownbutton")
.Text("Paste")
)

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

C#
public DropDownButtonBuilder ThemeColor(ThemeColor value)
Parameters:valueThemeColor

The value that configures the themecolor.

Returns:

DropDownButtonBuilder