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

Check button state

2 Answers 100 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
fredn
Top achievements
Rank 1
fredn asked on 18 Dec 2008, 03:10 PM
Hi,

I have a problem with RadToolBarButton configured as Check button. Indeed, I've tried to put, in the same toolbar, two RadToolBarButton with the following attributes for each of them :
CheckOnClick="true"
Checked="true"
AllowSelfUncheck="true"

Here is the code:

<telerik:RadToolBar ID="curveToolBar1" Runat="server">
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
<Items>                                
  <telerik:RadToolBarButton runat="server" ImageUrl="~/SU/Images/Legend.png" CheckOnClick="true"
                                                                Checked="true" AllowSelfUncheck="true" Value="2">
  </telerik:RadToolBarButton>            
  <telerik:RadToolBarButton runat="server" ImageUrl="~/SU/Images/Labels.png" CheckOnClick="true"
                                                                Checked="true" AllowSelfUncheck="true" Value="3">
  </telerik:RadToolBarButton>            
</Items>
</telerik:RadToolBar>

As a result, I can't get both buttons checked as the same time ! It works like toggle buttons !
How can I have the two buttons checked as the same time ?

Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 20 Dec 2008, 12:54 PM
Hello there,

I suggest you set different values to the Group property of the buttons like this:

<telerik:RadToolBarButton runat="server" ImageUrl="~/SU/Images/Legend.png" 
          CheckOnClick="true" Checked="true" AllowSelfUncheck="true"   
          Value="2" Group="1">  
</telerik:RadToolBarButton>              
<telerik:RadToolBarButton runat="server" ImageUrl="~/SU/Images/Labels.png" 
          CheckOnClick="true" Checked="true" AllowSelfUncheck="true"   
          Value="3" Group="2">  
  </telerik:RadToolBarButton>              
 

Greetings,
Yana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
fredn
Top achievements
Rank 1
answered on 22 Dec 2008, 09:54 AM
It works fine !

Thanks.
Tags
ToolBar
Asked by
fredn
Top achievements
Rank 1
Answers by
Yana
Telerik team
fredn
Top achievements
Rank 1
Share this question
or