My jquery datatable contain one column which has checkbox. i just want to count number of selected checkboxes from that jquery datatable and stor that count value in one variable for further processing. This is my code to create data table
oTable = $("#datatable-assessment-Notes").dataTable({
"bPaginate": true,
"bJQueryUI": true,
"bRetrieve": true,
"bDestroy": true,
// "bSorting": true,
"aaSorting": [[6, 'asc']],
"fnDrawCallback": function () {
NoteRadioButtonClick();
},
"aoColumns": [
{ "bSortable": false, "sType": "date", "aTargets": [0] },
{ "bSortable": true, "aTargets": [1] },
{ "aTargets": [2] },
{ "aTargets": [3] },
{ "aTargets": [4] },
{ "bSortable": false, "aTargets": [5] },
{ "bSortable": false, "aTargets": [6] },
{ "bSortable": false, "aTargets": [-1] }, ],
"fnRowCallback": function (nRow, aData) {
var isViewAll = $("#isview-all").val();
if (isViewAll == 1) {
$(".isviewall").remove();
$(".edit_note").remove();
}
return nRow;
}
});
and this is code for checkbox button
<td class="table_heading imp_class_tableData">
@Html.CheckBoxFor(m => item.priority, new { @id = "note_priority", @name = "Note_priority_check" })
</td>
Aucun commentaire:
Enregistrer un commentaire