smithmrk
asked on
ASP.net (CheckBoxList) determine which Item was Checked
Hello Experts!
Let me start by saying I don't want to loop through all the checkboxlist items.
What I'm trying to do is if a certian item is checked within the checkboxlist items box I want to disable the rest of the items in the list.
You see if have a list of roles...if the administrator selects the "Reporting" Role I want to disable ALL the other roles as this is the ONLY role they are allowed to have. Vise Versa if they uncheck the "Reporting" role I want to enable the rest of the roles again to be allowed to be checked off.
I have the checkboxlist inside a UpdatePanel so it will only Post Back this area of the page, but I want to know if that item is checked rather than looping through the whole list to see if that was checked off then have to loop through again to disable the rest of the roles.
Any ideas??
Thanks,
Mark
Let me start by saying I don't want to loop through all the checkboxlist items.
What I'm trying to do is if a certian item is checked within the checkboxlist items box I want to disable the rest of the items in the list.
You see if have a list of roles...if the administrator selects the "Reporting" Role I want to disable ALL the other roles as this is the ONLY role they are allowed to have. Vise Versa if they uncheck the "Reporting" role I want to enable the rest of the roles again to be allowed to be checked off.
I have the checkboxlist inside a UpdatePanel so it will only Post Back this area of the page, but I want to know if that item is checked rather than looping through the whole list to see if that was checked off then have to loop through again to disable the rest of the roles.
Any ideas??
Thanks,
Mark
ASKER
Is this JavaScript or Code Behind?
Code behind Linq
ASKER
OH...then this won't work, I'm using Visual Studio 2005 (.net 2.0) so Linq will NOT work.
Any other ideas??
Thanks,
Mark
Any other ideas??
Thanks,
Mark
Jquery posibility ?
ASKER
There is no way to get the item that was just checked in Code Behind?
If I click a box it automatically posts back...there must be a way to get the item I just checked off.
Mark
If I click a box it automatically posts back...there must be a way to get the item I just checked off.
Mark
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
OK, I'll get back to you then...stay tune.
I'll try it out and get back to you.
Mark
I'll try it out and get back to you.
Mark
ASKER
Well I'll give you the points for helping me out...but I decided to do it a totally different way rather than screw around with the CheckBoxList.
Thanks for the help though!
Mark
Thanks for the help though!
Mark
var selected = CBLGold.Items.Cast<ListIte
and populate other items