I have an ItemTemplate which where each item contains a RadComboBox with checkboxes enabled. I need to apply some business logic that will disable or enable checkboxes in the combobox depending on the user's selections. What I need to know, is how to disable those checkboxes. So for example:
<Combobox CssClass="Assignees">
<cb> <Item 1>
<cb> <Item 2>
<cb> <Item 3>
<cb> <Item 4>
If item 4's checkbox is selected, then all other checkboxes are disabled. If it's unselected, then everything is re-enabled. If items 1,2 or 3 are selected, then Item 4's checkbox is disabled.
I've tried something like:
$(".AssigneeTag").find(":checkbox").click(
function () {
var allCheckboxes = $(this).closest(".AssigneeTag").find(":checkbox");
});
Just to get all of the checkboxes in the combobox. This is not returning anything. Then I know I need to go from here to inspect the itemdata to determine the "type" so that I can figure out what to hide or show.
Can anyone point me in the right direction?
EDIT: As requested, the HTML. I was able to dig this out of it. Just looking at it, I'm not able to wrap my head around what to do. The items loaded into the item list are actually objects that contain 3 fields; a name, a guid, and a type. I'll need to look at the type to apply the business logic, but I'm not seeing it even appearing here:
<div id="ctl00_MainContent_lsvTickets_ctrl0_lsvActions_cboAssignTo" class="RadComboBox RadComboBox_Default AssigneeTag" ItemDataBound="Assignees_Bound" style="width:160px;">
<table summary="combobox" style="border-width:0;border-collapse:collapse;table-layout:fixed;width:100%">
<tr class="rcbReadOnly">
<td style="margin-top:-1px;margin-bottom:-1px;width:100%;" class="rcbInputCell rcbInputCellLeft">
<input name="ctl00$MainContent$lsvTickets$ctrl0$lsvActions$cboAssignTo" type="text" class="rcbInput" id="ctl00_MainContent_lsvTickets_ctrl0_lsvActions_cboAssignTo_Input" value="" style="display: block;" readonly="readonly" />
</td>
<td style="margin-top:-1px;margin-bottom:-1px;" class="rcbArrowCell rcbArrowCellRight"><
a id="ctl00_MainContent_lsvTickets_ctrl0_lsvActions_cboAssignTo_Arrow" style="overflow: hidden;display: block;position: relative;outline: none;">select</a>
</td>
</tr>
</table>
<div class="rcbSlide" style="z-index:6000;">
<div id="ctl00_MainContent_lsvTickets_ctrl0_lsvActions_cboAssignTo_DropDown" class="RadComboBoxDropDown RadComboBoxDropDown_Default " style="float:left;display:none;">
<div class="rcbScroll rcbWidth" style="width:100%;">
<ul class="rcbList" style="list-style:none;margin:0;padding:0;zoom:1;">
<li class="rcbItem "><input type="checkbox" class="rcbCheckBox" />Mike ITTest</li>
<li class="rcbItem "><input type="checkbox" class="rcbCheckBox" />Jeremy Stafford</li>
<li class="rcbItem "><input type="checkbox" class="rcbCheckBox" />John Bell Test (Info. Tech.)</li>
<li class="rcbItem "><input type="checkbox" class="rcbCheckBox" />Mike ITTest (Info. Tech.)</li>
<li class="rcbItem "><input type="checkbox" class="rcbCheckBox" />AG Cust Support</li>
<li class="rcbItem "><input type="checkbox" class="rcbCheckBox" />AG Eng Support</li>
<li class="rcbItem "><input type="checkbox" class="rcbCheckBox" />AG HR Support</li>
<li class="rcbItem "><input type="checkbox" class="rcbCheckBox" />AG IT Support</li>
</ul>
</div>
</div>
</div>
<input id="ctl00_MainContent_lsvTickets_ctrl0_lsvActions_cboAssignTo_ClientState" name="ctl00_MainContent_lsvTickets_ctrl0_lsvActions_cboAssignTo_ClientState" type="hidden" />
</div>