This is a migrated thread and some comments may be shown as answers.

RadToolBarDropDown Text

1 Answer 35 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 06 Dec 2011, 02:25 PM
I'm writing to ask how best to apply text to the RadToolBarDropDown programmatically, in C#;

Thanks in advance for any insight;  Best regards - Rob

<telerik:RadToolBar ID="RadToolBar3" runat="server" Skin="Black"  
                   BorderWidth="0px" onbuttonclick="RadToolBar3_ButtonClick">
                 <Items>
                     <telerik:RadToolBarDropDown runat="server" Font-Size="Medium">
                         <Buttons>
                             <telerik:RadToolBarButton runat="server" Text="Sign Out" Font-Size="Medium" CheckOnClick="true" CommandName="SignOut">
                             </telerik:RadToolBarButton>
                             <telerik:RadToolBarButton runat="server" Text="Contact Us" Font-Size="Medium" CheckOnClick="true" CommandName="ContactUs">
                             </telerik:RadToolBarButton>
                         </Buttons>
                     </telerik:RadToolBarDropDown>
                 </Items>
   </telerik:RadToolBar>

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 1
answered on 07 Dec 2011, 05:56 AM
Hello Robert,

Try the following code snippet.
C#:
protected void Page_Load(object sender, EventArgs e)
{
  RadToolBarDropDown dropDown = new RadToolBarDropDown();
  dropDown.Text = "DropDown1";
  dropDown.Buttons.Add(new RadToolBarButton("Text"));
  RadToolBar3.Items.Add(dropDown);
}

-Shinu.
Tags
ToolBar
Asked by
Robert
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Share this question
or