How to prevent string "NO" from displaying as false
How to prevent string "NO" from displaying as false
gvolland
Posts: 3Questions: 2Answers: 0
Hi,
I have a table using ajax as the data source, array of arrays. One of the values in the dataset is the string "NO". (Language abbreviation for Norway). However, datatables is displaying the string as "false".
Is there an option to tell datatables to display the string rather than converting it to boolean?
menu.tables.picklists = $("#picklistsTbl").DataTable({
"dom": "fi<'clear'><rt>lp",
"scrollY": main.appSetup.appHeight()-275 + "px",
"scrollX":true,
"lengthMenu" : [[25,50,100,-1],[25,50,100,"ALL"]],
"order":[[1,"asc"],[4,"asc"]],
"pagingType": "simple_numbers",
"autoWidth": true,
"language": {
"emptyTable": "No Picklist Values Found"
},
"ajax" : "/RAMP/cfcData/picklist.cfc?method=listAll",
"columns" : [
{"title": "PicklistId"}
,{"title": "Category"}
,{"title": "Item"}
,{"title": "Description"}
,{"title": "Sort"}
,{"title": "IsActive", "render": function(d,t,f) {if(d == 1){return "YES";} else {return "NO"}}}
]
}); //DataTables
Sample of data from Coldfusion cfdump:
164
array
1 340
2 lang
3 NO
4 Norwegian
5 16
6 1
Thanks,
Gary
This discussion has been closed.