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

Items

The Telerik UI for ASP.NET Core DropDownButton provides a various set of options for its Items.

The following example demonstrates how to configure the DropDownButton items.

    @(Html.Kendo().DropDownButton()
        .Name("DropDownButton")
        .Icon("paste")
        .Items(items =>
        {
            items.Add().Id("keep-text").Text("Keep Text Only").Icon("paste-plain-text");
            items.Add().Id("paste-html").Text("Paste as HTML").Icon("paste-as-html").Hidden(true);
            items.Add().Id("paste-markdown").Text("Paste Markdown").Icon("paste-markdown").Enabled(false);
            items.Add().Id("favorite").Text("Mark As Favorite").ImageUrl(Url.Content("~/content/shared/icons/16/star.png"));
        })
    )
   <kendo-dropdownbutton name="DropDownButton" text="Paste" icon="paste">
        <dropdownbutton-items>
            <item id="keep-text" text="Keep Text Only" icon="paste-plain-text"></item>
            <item id="paste-html" text="Paste as HTML" icon="paste-as-html" hidden="true"></item>
            <item id="paste-markdown" text="Paste Markdown" icon="paste-markdown" enabled="false"></item>
            <item id="favourite" text="Mark As Favourite" image-url="@Url.Content("~/content/shared/icons/16/star.png")"></item>
        </dropdownbutton-items>
   </kendo-dropdownbutton>

See Also

In this article