I want to get a particular row data from jQuery data table. Can anyone help me to get the record with first column id?
function showchnldetail(val) {
var oTable = $('#example').dataTable();
var aData = oTable.fnGetData(val);
if (null != aData) {
alert('enter');
}
}
val
is first column id. I want to store the data in a variable.
var aDataSet = [ ['96', 'xx', 'product1', '144']];
I assign the above dataset to otable
.
var nodes = datatable.fnGetNodes();
var row = null;
jQuery.each(nodes, function(key, fila){
if(jQuery(fila).attr('id') == idrow){
row = fila;
}
});
var pos = datatable.fnGetPosition(row);
datatable.fnUpdate('new value', pos, 1);