Click here to Skip to main content
Rate this: bad
good
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 1: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 at 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
0 Sergey Alexandrovich Kryukov 269
1 OriginalGriff 240
2 CPallini 195
3 Maciej Los 177
4 BillWoodruff 173
0 OriginalGriff 5,655
1 DamithSL 4,506
2 Maciej Los 3,997
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,180


Advertise | Privacy | Mobile
Web03 | 2.8.141216.1 | Last Updated 3 May 2012
Copyright © CodeProject, 1999-2014
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