问题
actually i want to display Checkbox in the list for Boolean values from database
OriginatingLocation: {
title: 'Originating Location',
width: '30%',
list: true,
type:checkbox,
create: false,
edit: false
},
回答1:
It seems like you dont want to add or edit the record then it is very easy.
jTable damo page (PagingAndSorting demo) having display:
function, You can see it here. Also you can find more about jTable ApiReference here.
Below code may help you
OriginatingLocation: {
title: 'Originating Location',
width: '30%',
list: true,
display: function (data) {
if (data.record.OriginatingLocation == true)
{
return '<input type="checkbox" checked>';
}
else
{
return '<input type="checkbox">';
}
},
create: false,
edit: false
},
Here OriginatingLocation
is Boolean field.
来源:https://stackoverflow.com/questions/27814335/jquery-jtable-checkbox-is-not-showing-in-the-list