How to always have one button toggled in a toggle buttons group

1 posts, 0 answers
  1. Telerik Admin
    Telerik Admin avatar
    1679 posts
    Member since:
    Oct 2004

    Posted 11 Oct 2006 Link to this post

    Requirements

    r.a.d.toolbar version

    1.3

    .NET version

    NET 2.0

    Visual Studio version

    2005

    programming language

    C#

    browser support

    all browsers supported by r.a.d.toolbar


     
    PROJECT DESCRIPTION

    Normally, if you set ButtonGroup to the same value for several toggle buttons you will end up with a radio button like functionality - if you toggle one button the other one is untoggled. However, if you click on an already toggled button it will untoggle so you will have no toggled items in the group. This project shows how to always have one toggled button. This functionality is achieved entirely on the client. We traverse all the buttons in the toggle group and check if there are no toggled buttons - the case when we click on an already toggled button. If that's the case we make this button toggled with the ToggleOnButton method.  
Back to Top