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

Thread is closed for posting
1 posts, 0 answers
  1. 63F75A2C-1F16-4AED-AFE8-B1BBD57646AD
    63F75A2C-1F16-4AED-AFE8-B1BBD57646AD avatar
    1572 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

This Code Library is part of the product documentation and subject to the respective product license agreement.