RadToolBar for ASP.NET

Toggle Button Groups Send comments on this topic.
Defining the ToolBars Structure > Toggle Button Groups

Glossary Item Box

Button groups allow you to gather several toggle buttons and apply radio button functionality to their group. All you have to do is set the ButtonGroup property with the naming of the group as a parameter.

Examples

1. Defining a button group:

Button Group

  Copy Code
<rad:radtoolbar runat="server" id="Radtoolbar2" skin="Office2003" UseFadeEffect="True">
   
<items>
       
<rad:radtoolbartogglebutton id="button_bold" Toggled="True" Tooltip="Bold" CommandName="bold" ButtonText="Bold" ButtonImage="bold.gif" />
       
<rad:radtoolbartogglebutton id="button_italic" Tooltip="Italic" CommandName="italic" ButtonText="Italic" ButtonImage="italic.gif" />
       
<rad:radtoolbartogglebutton id="button_undeline" Toggled="True" Tooltip="Underline" CommandName="underline" ButtonText="Underline" ButtonImage="underline.gif" />
       
<rad:radtoolbarseparator/>
       
<rad:radtoolbartogglebutton AccessKey="l" Tooltip="Align Left (Alt+L)" ButtonGroup="Alignment" CommandName="alignLeft" />
       
<rad:radtoolbartogglebutton AccessKey="c" Toggled="True" Tooltip="Align Center (Alt+C)" ButtonGroup="Alignment" CommandName="Center" />
       
<rad:radtoolbartogglebutton AccessKey="r" Tooltip="Align Right (Alt+R)" ButtonGroup="Alignment" CommandName="alignRight" />
       
<rad:radtoolbartogglebutton AccessKey="j" Tooltip="Justify (Alt+J)" ButtonGroup="Alignment" CommandName="Justify" />
   
</items>
</
rad:radtoolbar>

2. These examples demonstrate two javascript statements which you can use to change the status (enable/disable) of a toggle button each time you call it on the client-side:

  Copy Code
toolbar1.GetButtonByCommand("button").ToggleButton(true/false);
  Copy Code
button.ToggleButton(true/false)