I'm trying to display 10 records
per page but is hows the NAN
values Below is the Code snippet
$('#JarDistHist').jtable('detach');
$('#JarDistHist').jtable({
title: 'Jar Distribution History',
paging: true,
pageSize: 10,
sorting: true,
defaultSorting: 'Date ASC',
actions: {
listAction: 'StudentActions.php?action=list&DistId='+cname+'&fitem='+fitem+'',
deleteAction: 'StudentActions.php?action=delete'
},
fields: {
id: {
key: true,
create: false,
edit: false,
list: false,
},
Date: {
title: ' Date',
type: 'date',
displayFormat: 'dd-mm-y',
width: '40%'
},
TotRecvJars: {
title: 'Rec. ',
width: '30%',
display: function (data) {
return $('<a href="JarFillingDetail.php?id=' + data.record.id + '">'+data.record.TotRecvJars+'</a>');
// return $('<a href="JarFillingDetail.php?id=' + data.record.id + '">'+data.record.Date.format('DD-MM-YY')+');
}
},
NoOfJarsFill: {
title: 'Filled ',
width: '30%',
type:'integer',
display: function (data) {
return $('<a href="JarFillingDetail.php?id=' + data.record.id + '">'+data.record.NoOfJarsFill+'</a>');
}
},
BalanceJars: {
title: 'Bal. ',
width: '30%',
type:'integer',
display: function (data) {
return $('<a href="JarFillingDetail.php?id=' + data.record.id + '">'+data.record.BalanceJars+'</a>');
}
}
}
});
//Load person list from server
$('#JarDistHist').jtable('load');
In your column definitions you are saying type: 'integer'
(NoOfJarsFill and BalanceJars), which means you want to display a number. But then you are returning HTML content as the value, which is not a number. "Not A Number" is exactly what NAN stands for.
Change type: 'integer'
to type: 'string'
and your problem will be solved.