I Have gridview, which will have checkbox and type. The type will be either rural or village. I need to get count of rural and village has been checked in gridview and display in label as
Rural / Village : 15/12
If i Check or uncheck new row, the count value should be update
I have tried this in Jquery but its not worked
$('#btnGenerate1004MCTop').click(function () {
var rural = 0;
var village = 0;
$("input[id$=chk_Compare]:checked").each(function () {
if($(this).next("input[id$=type]").val()){
rural + = 1;
}
else {
village + = 1;
}
});
});
Aucun commentaire:
Enregistrer un commentaire