Tanya Samson
Tanya Samson

Reputation: 19

Finding Child Elements Using Jquery

I have placed the ListView inside Panel. The Listview contains CheckBoxes. Now, if I click on the panel, it should only display Popup, when the checkBOX is checked. Otherwise It should not load Popup.

Now how to check using the jQuery whether the Checkbox inside Listview is checked or not? Please Help....

 if ($('#<%=ListView.ClientID%> input:checkbox).is(:checked)')){ShowLoadingPanel();}





<telerik:RadListView ID="Listview" runat="server" OnItemCommand="Listview_ItemCommand" 
                                        AllowMultiItemSelection="true">
                                        <ItemTemplate>
                                            <telerik:RadButton ID="chk1" ButtonType="ToggleButton" ToggleType="CheckBox"
                                                Text='<%# Eval("c") %>' CssClass="CheckBox" runat="server" CommandName="Edit" 
                                                AutoPostBack="true" ForeColor="Black" Font-Size="12px" line-height="18px">
                                            </telerik:RadButton>
                                            <br />
                                        </ItemTemplate>
                                    </telerik:RadListView>

Upvotes: 0

Views: 140

Answers (2)

SteinIP
SteinIP

Reputation: 474

if ($(#myListViewID > input[type=checkbox]:checked).length > 0) doPopup();

ref: http://api.jquery.com/checked-selector/

Upvotes: 2

sakthi
sakthi

Reputation: 929

if($('#ListView input:checkbox').is(':checked')){

}

Upvotes: 2

Related Questions