Mutually Exclusive Checkbox

3 posts, 0 answers
  1. Mohammed Imaduddin
    Mohammed Imaduddin avatar
    24 posts
    Member since:
    Jul 2009

    Posted 29 Apr 2010 Link to this post

    Does anyone know if there is a way to get a Mutually Exclusive Checkbox with this listbox control. Like the one available thru the Ajax Toolkit?
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 30 Apr 2010 Link to this post

    Hello Mohammed,

    You can achieve the same functionality by using client-side API of RadListBox control.

    Attach the OnClientItemChecked event to RadListBox and check/uncheck the corresponding item after getting reference the item. Use the findItemByText/findItemByValue/findItemByAttribute methods for getting reference to corresponding item. Then use the set_checked() method to check/uncheck the item.

    Hope the following links would be helpfull for you:

    Client-side Basics

    RadListBox client API


  3. DevCraft R3 2016 release webinar banner
  4. William
    William avatar
    1 posts
    Member since:
    Oct 2012

    Posted 10 Jul 2014 Link to this post

    I don't know about findItemByText/findItemByValue/findItemByAttribute BUT for those who's looking for a quick fix.  Here it is.

    function rlboxRoles_ItemChecked(sender, args) {
            var listbox = sender;
            var items = listbox.get_items();
            var count = items.get_count();
            var checkedItem = args.get_item();
            var index = items.indexOf(checkedItem);
            for (var i = 0; i < count; i++) {
                if (i != index) {
                else {
Back to Top