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

Set selected item in RadToolBarSplitButton

The RadToolBarSplitButton can have a different Text and Value from its child items and this is controlled by the EnableDefaultButton property. If the property is set to true(the default value) then the child items' text and value are used. More information can be found in the ToolBar - Default Items article.

As the ToolBarSplitButton's text and value relies on it's items ("default items"), if you need to pre-select a given item, you need to use the DefaultButtonIndex property as demonstrated in the example below:

var item = SplitButton1.Buttons.FindButtonByText("Third");
SplitButton1.DefaultButtonIndex = item.Index;
<telerik:RadToolBar runat="server" ID="RadToolbar1">
        <telerik:RadToolBarSplitButton runat="server" ID="SplitButton1">
                <telerik:RadToolBarButton Text="First" Value="First" ></telerik:RadToolBarButton>
                <telerik:RadToolBarButton Text="Second" Value="Second" ></telerik:RadToolBarButton>
                <telerik:RadToolBarButton Text="Third" Value="Third" ></telerik:RadToolBarButton>

See Also

In this article