Check box
Check box
Hi
I am trying to add check box rows to my data table column which basically loaded either selected or not selected based on column value (i.e column header value = Y, selected, else not selected), but I am getting either Y or N, instead of check box. Below is the code, can you please help me to figure it out the solution.
"aoColumnDefs": [
{ "aTargets": [0], "mData": "uName" },
{ "aTargets": [1], "mData": "OrgName" },
{ "aTargets": [2], "mData": "uEmail" },
{ "aTargets": [3], "mData": "uTelephone" },
{ "aTargets": [4], "mData": "uStatus" // This value either can be Yor N, if Y, check box is selected.
"bSearchable": false
, "fnRender": function (obj) {
var html = '<input name="parameter" type="checkbox"' + (obj.aData[obj.iDataColumn] == 'Y' ? ' checked="checked"' : '') + ' onclick="$(document).Default(' + "'" + 'toggleParameter' + "'" + ', event, this, ' + obj.iDataRow + ', ' + obj.iDataColumn + ');" />';
return html;
}
, "bUseRendered": false
}
]
Your help is greatly appreciated.
Thanks
Madhu