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

Kendo UI DropDownButton component

Definition

Constructors

Initializes a new instance of the DropDownButton class.

C#
public DropDownButton(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator)
Parameters:viewContextViewContext

The view context

initializerIJavaScriptInitializer

The JavaScriptInitializer

urlGeneratorIUrlGenerator

The URL generator.

Properties

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

C#
public bool? Enabled { get; set; }

Sets a value controlling how the color is applied.

C#
public FillMode? FillMode { get; set; }

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 string Icon { get; set; }

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 string IconClass { get; set; }

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 string ImageUrl { get; set; }

Specifies the menu buttons of the DropDownButton.

C#
public List<DropDownButtonItem> Items { get; set; }

Specifies a custom template for the menu items.

C#
public string ItemTemplate { get; set; }

The handler for the ItemTemplate

C#
public string ItemTemplateHandler { get; set; }

The id for the ItemTemplate

C#
public string ItemTemplateId { get; set; }

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

C#
public DropDownButtonMessagesSettings Messages { get; set; }

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

C#
public DropDownButtonPopupSettings Popup { get; set; }

Sets a value controlling the border radius.

C#
public Rounded? Rounded { get; set; }

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

C#
public bool? ShowArrowButton { get; set; }

Sets the size of the component.

C#
public ComponentSize? Size { get; set; }

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 string SpriteCssClass { get; set; }
C#
public string Text { get; set; }

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

C#
public ThemeColor? ThemeColor { get; set; }

Methods

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: WidgetBase.Serialize()

Writes the HTML.

C#
protected override void WriteHtml(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

The HtmlTextWriter.

Overrides: WidgetBase.WriteHtml(HtmlTextWriter)

Writes the initialization script.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

The TextWriter.

Overrides: WidgetBase.WriteInitializationScript(TextWriter)