-1
我是datable的新手。 在db
我有一個boolean variable
名爲Paid
基於此,如果它是1複選框應該是活動和0未選中。我已經嘗試了一些代碼。將數值分配給數據表中的db複選框
"render": function(data, type, full) {
if (data.Paid == 'false') {
return '<div class="checkbox alignCenter check-control" onclick="event.stopPropagation();">' +
'<label class="check " onclick="event.stopPropagation();">' +
'<input type="checkbox" id="cbInvoicePaid_' + (index++) + '" class="cbInvoicePaid" onclick="event.stopPropagation();" autocomplete="off">' +
'<span class="cr tab checkfocus"><i class="cr-icon fa fa-check"></i></span>' +
'</label>' +
'</div>'
}
}
任何控制檯錯誤/問題,您的問題是什麼? – madalinivascu
沒有控制檯的錯誤問題,如果做這樣的數據表不顯示 –
你說付出的價值應該是0或1,而你正在比較data.Paid =='假' –