Get checked rows data of datatable in jquery
Get checked rows data of datatable in jquery
pravin ghadge
Posts: 1Questions: 1Answers: 0
// Creating Datatable
$.ajax({
url: '../CN/Get_Chart_Paramters',
type: "GET",
contentType: "application/json; charset=utf-8",
success: function (data) {
data = JSON.parse(data);
dataResult = JSON.parse(data.result);
var row = "";
$.each(dataResult, function (index, item) {
row += "<tr class='table-row'><td>" + item.CheckBox + "</td><td>" + item.COLUMN_NAME + "</td><td>" + item.Chart_Axes_Type + "</td></tr>";
});
$("#tbodyChartsParameter").html(row);
$('#ChartsParamterTable').dataTable({
"paging": false,
"ordering": false,
"info": false,
bFilter: false
, "multipleSelection": true,
'aoColumns': [
{
'sTitle': '<input type="checkbox" class="checkbox" id="check-all">',
'mData': 'id',
'mRender': function (id) {
return '<input type="checkbox" class="checkbox" class="checkbox" name="' + id + '">';
},
'sWidth': '15px',
'bSortable': false
}
,
{
'sTitle': 'Parameter Name',
'mData': 'COLUMN_NAME'
},
{
'sTitle': 'Axes Type',
'mData': 'Chart_Axes_Type'
}
],
});
datatable_ChartParameter = $('#ChartsParamterTable').dataTable();
At Button Click Event:
//Here i am able to get the checked rows . But unable to find the whole row columns data
var rowcollection = oTable.$(".checkbox:checked", { "page": "all" });
rowcollection.each(function (index, elem) {
var checkbox_value = elem.name;
});
DataTables has Following columns:
CheckBox
Paramter Name
Axes Type
Here i want the value of Axes Type in rowcollection function.
Please help me
This discussion has been closed.