How to replace value return from database with checkbox in datatable column ?
How to replace value return from database with checkbox in datatable column ?
Al-jalodi
Posts: 1Questions: 1Answers: 0
$(document).ready(function () {
$.ajax({
url: 'WebService4Test.asmx/tabledata',
method: 'post',
dataType: 'json',
success: function (data) {
var checkbox = "";
$('#datatable').dataTable({
paging: true,
sort: true,
searching: true,
scrollY: 200,
data: data,
columns: [
{ 'data': 'username' },
{ 'data': 'email' },
{ 'data': 'password' },
{ 'data': 'usertype' },
{ 'data': 'isactive'},
{
'data': 'WebSite',
'sortable': false,
'searchable': false,
'render': function (webSite) {
if (!webSite) {
// return 'N/A';
return '').text(data.isactive).html() + '">';
}
else {
return ''
+ webSite.substr(0, 10) + '...' + '';
}
}
}
]
});
}
});
});
This discussion has been closed.