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

Thread is closed for posting
1 posts, 0 answers
  1. Telerik Admin
    Telerik Admin avatar
    1572 posts
    Member since:
    Oct 2004

    Posted 11 Oct 2006 Link to this post


    r.a.d.toolbar version


    .NET version

    NET 2.0

    Visual Studio version


    programming language


    browser support

    all browsers supported by r.a.d.toolbar


    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.