Replacing "null" value
Replacing "null" value
satheshshiva
Posts: 3Questions: 1Answers: 0
Hi..
I am using the latest version of the Datatables (1.7.6) with MySQL database. I am using the Ajax Source to get the Json data for the table. If there is a null value then the data table displays the string "null".
Please let me know how to replace this with the empty string "" without the string "null"My deadline is tomorrow for my project. So please help me out ASAP.
I am sorry if this question was answered in any other thread but I have really no time to check because of my project deadline. :(
I am using the latest version of the Datatables (1.7.6) with MySQL database. I am using the Ajax Source to get the Json data for the table. If there is a null value then the data table displays the string "null".
Please let me know how to replace this with the empty string "" without the string "null"My deadline is tomorrow for my project. So please help me out ASAP.
I am sorry if this question was answered in any other thread but I have really no time to check because of my project deadline. :(
This discussion has been closed.
Replies
[code]
/* Allow null data (from a data array) - simply deal with it as a blank string */
if ( aData[i] === null )
{
aData[i] = '';
}
[/code]
So that suggests that perhaps the JSON data has "null" as a string rather than an actual null. The quickest way to get a accurate answer (other than making a donation of course :-) ) is if you could post an example please. Failing that, in this case the JSON return would be interesting.
Allan
Another issue I am facing is that the Pagination type "full_numbers" appears to be very compressed with minimal width when I enable "bJQueryUI": true property. I use "Smoothness" theme of the jQuery.
When I disable that the pagination appears to be fine. Am not sure where to change the width of the pagination.
I tried changing the CSS width,
[code]
.dataTables_paginate {
width: 50px;
* width: 40px;
float: right;
text-align: right;
}
[/code]
But no use. Please help me out.
Is that anyway to share a screenshot right here?
Thanks a lot.
Are you using the demo_table_jui.css file which comes with DataTables? If so it should look like the demo table here: http://datatables.net . Firebug might be useful for figuring out where the styles are coming from.
Allan