Click here to Skip to main content
14,640,670 members
Rate this:
Please Sign up or sign in to vote.
I've a struts checkboxlist for setting 'Status' as
<s:checkboxlist list="{'Enabled','Disabled'}" name="processVO.status"/>
. So when I check any one from this list, the other one should be disabled (if 'Enabled' is checked 'Disabled' should go disable and converse is also true). I tried a number ways, but not working. Pls help.

Thanks
Posted
Rate this:
Please Sign up or sign in to vote.

Solution 1

Fire The Check Change Event of Check Box List and Make its auto post back property 'true'

Now Write this code in event
Foreach(ListItem in CheckBoxList.Items)
{
   item.selected.equals(false);
}

e.item.seleted.equal(true);
   
v2
Rate this:
Please Sign up or sign in to vote.

Solution 2

hi ,

we can do this using java script in asp.net

Chcek only one check box at a time in check box list[^]
   
Comments
Vincent Ghomus 4-May-12 2:48am
   
I had same probs facing after trying. So I replaced the checkboxlist with radiobox finally. That works fine. Thanks for the suggestions :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100