Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I've a struts checkboxlist for setting 'Status' as
HTML
<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

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

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

e.item.seleted.equal(true);
 
Share this answer
 
v2
hi ,

we can do this using java script in asp.net

Chcek only one check box at a time in check box list[^]
 
Share this answer
 
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, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900