asp.net checkbox in gridview - checked property is missing
- by Peter PitLock
In this asp.net gridview control, the checked property is always missing. I need to access the checked property via jquery
Gridview source:
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="chkSelected" runat="server" class="chkSummarySelection" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
Renders as :
<input type="checkbox" name="ctl00$ContentPlaceHolder1$gv$ctl02$SelectedCheckBox" id="ctl00_ContentPlaceHolder1_gv_ctl02_SelectedCheckBox">
There is no checked property to access.
I have tried
$(".chkSummarySelection").click(function () {
var chk;
chk = $(this).prop("checked");
chk = $(this).attr("checked");
chk = $(this).is(":checked");
chk = $(this).attr("value");
chk = $(this).val();
chk = jQuery(this).is(':checked');
});
but nothing is working