The function always returns false, eventhough the checkbox is checked. I really couldn't crack down what i'm doing wrong. I'm using a checkbox to enable and disable the textbox in the gridview. However, it doesn't seem to work. Thanks for the help. I have posted the html and jq code below.
HTML code:
<asp:GridView ID="grdFees" runat="server" AllowPaging="false" CssClass="Grid" AutoGenerateColumns="false" EmptyDataText="No Data Found" EmptyDataRowStyle-HorizontalAlign="Center" EmptyDataRowStyle-CssClass="gridItem" TabIndex="5">
<Columns>
<asp:TemplateField HeaderText="Select" HeaderStyle-HorizontalAlign="center"
ItemStyle-HorizontalAlign="center" ItemStyle-Width="2%">
<ItemTemplate>
<asp:CheckBox ID="chkselect" runat="server" CssClass="checkbox"
Width="15px" Checked="false" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
Jquery code:
$(document).ready(function()
{
$(".checkbox").click(function()
{
if ($(this).is(":checked"))
{
alert("true");
}else
{
alert("false");
}
});