null value in my sAjaxSource

null value in my sAjaxSource

CharlyPoppinsCharlyPoppins Posts: 16Questions: 2Answers: 0
edited July 2012 in General
Hi,

I've got some null value in my sAjaxSource result. null occurred when there are accents in the record.

What can I do to prevent that ?

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    You could use sDefaultContent as an empty string - i.e. "sDefaultContent": "".

    You need to tell DataTables how to render 'null' data basically since it can't really display null itself.

    Allan
  • CharlyPoppinsCharlyPoppins Posts: 16Questions: 2Answers: 0
    Thanks, but that's not the real problem. I don't understand why I've got null values in my sAjaxSource results ( like ["1201",null,"84510","CAUMONT SUR DURANCE","0490451234"] ). I should have "GENO Danièle" instead of null.
    That happens with every records with accents.
  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    Oh I see - what is generating your JSON feed? The problem will be there. Sounds like you might need to set the character set that you are reading from the database.

    Allan
  • CharlyPoppinsCharlyPoppins Posts: 16Questions: 2Answers: 0
    Of course... Thanks a lot :)
This discussion has been closed.