I have found the solution according to my needs, here's the code snippet for anyone in future looking for such functionality.
[code]"aoColumnDefs": [
{
// `data` refers to the data for the cell (defined by `mData`, which
// defaults to the column being worked with, in this case is the first
// Using `row[0]` is equivalent.
"mRender": function(data, type, row) {
if (data === '1') {
return 'Yes';
} else {
return 'No';
}
},
"aTargets": [5]
}
][/code]
@Allan: I have another issue though, my columfilter doesn't seem to work anymore, is there any fix for that?
I have found the solution to columnfilter not working, hope this helps anyone in future looking at this.
I simply used jQuery to replace the 1's and 0's in select to Yes or No'
[code] $(".select_filter option").each(function() {
if ($(this).text() === '1') {
$(this).text('Yes');
}
else if ($(this).text() === '0') {
$(this).text('No');
}
});[/code]
Replies
Allan
Sorry, but I am not able to understand how I would do this. I am quiet a noob on your library.
Plus your jsbin live testing is dead, which is making it hard for me to understand.
Vrutin
[code]"aoColumnDefs": [
{
// `data` refers to the data for the cell (defined by `mData`, which
// defaults to the column being worked with, in this case is the first
// Using `row[0]` is equivalent.
"mRender": function(data, type, row) {
if (data === '1') {
return 'Yes';
} else {
return 'No';
}
},
"aTargets": [5]
}
][/code]
@Allan: I have another issue though, my columfilter doesn't seem to work anymore, is there any fix for that?
Allan
I simply used jQuery to replace the 1's and 0's in select to Yes or No'
[code] $(".select_filter option").each(function() {
if ($(this).text() === '1') {
$(this).text('Yes');
}
else if ($(this).text() === '0') {
$(this).text('No');
}
});[/code]