CheckBox in Grid View inside a modal popup
I have a CheckBox field in a GridView in an aspnet webform, which I want to show in a modal popup window when user clicks a button. When user select each checkbox, I want to run server side code for OnCheckedChanged event for that checkbox using jQuery.
I am using the following to achieve my requirement
$(function () {
$("[id*=btnShowPopup]").click(function () {
ShowPopup();
return false;
});
});
function ShowPopup() {
$("#dialog").dialog({
title: "GridView",
width: 1100,
buttons: {
Ok: function () {
$(this).dialog('close');
},
},
open: function (type, data) {
$(this).parent().appendTo("form1");
$("input[type=checkbox]").click(function () {
$("input[type=checkbox]").trigger("change");
} else {
alert("false");
}
});
},
modal: true
});
}
When the checkbox is checked I get no response, but when it is unchecked, alert is shown.
Can anyone please through some light?