Click here to Skip to main content
12,396,961 members (38,619 online)
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 1-May-12 0:28am
Rate this: bad
 
good
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);
  Permalink  
v2
Rate this: bad
 
good
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[^]
  Permalink  
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 3 May 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

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