I am using telerik Radcombobox and in that radcombobox i am using some checkbox like this:
But i am not able to check and uncheck the checkboxes which are inside the radcombox.
<telerik:RadComboBox ID="rad1" runat="server" Width="200" Font-Names="Arial" DropDownWidth="460"
AutoPostBack="true" EmptyMessage="Select Action Type(s)" EnableScreenBoundaryDetection="false" OffsetX="-0">
<HeaderTemplate>
<div class="header">
<asp:CheckBox ID="selectAll" CssClass="All" runat="server" Text="Select All" />
</div>
---------Section 1 -----------
<ul>
<div id="section1" class="section">
<li class="carousel-border">
<asp:CheckBox ID="chkParent1" CssClass="section1parent" runat="server" Text="Check All" /> --Parent of below 2 checkboxes
</li>
<li>
<asp:CheckBox ID="chkchild1" CssClass="section1child" runat="server" Text="Child 1" />
</li>
<li>
<asp:CheckBox ID="chkchild2" CssClass="section1child" runat="server" Text="Child 2" />
</li>
</div>
---------Section 2 -----------
<div id="section2" class="section">
<li class="carousel-border">
<asp:CheckBox ID="chkParent2" runat="server" Text="Check all" /> --Parent of below 2 checkboxes
</li>
<li>
<asp:CheckBox ID="chkchild3" runat="server" Text="Child 3" />
</li>
<li>
<asp:CheckBox ID="chkchild4" runat="server" Text="Child 4" />
</li>
</div>
</ul>
</HeaderTemplate>
</telerik:RadComboBox>
--This is for section 1----
This is on check of section1 CheckAll
$("#section1 .section1parent").change(function () {
$(this).closest('.section').find(':checkbox').prop('checked', this.checked);
});
But my two checkbox i.e chkchild1 and chkchild2 are not getting checked.
I guess the reason could be the find function isnt able to find the checkbox as because checkbox are under radcombox.
Can anybody tell me why this is happening and whats the solution for this??