Check button state

3 posts, 0 answers
  1. fredn
    fredn avatar
    14 posts
    Member since:
    May 2008

    Posted 18 Dec 2008 Link to this post

    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. Yana
    Admin
    Yana avatar
    4576 posts

    Posted 20 Dec 2008 Link to this post

    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.
  3. fredn
    fredn avatar
    14 posts
    Member since:
    May 2008

    Posted 22 Dec 2008 Link to this post

    It works fine !

    Thanks.
Back to Top