Hi guys, I can't add a default value for empty data, like "Not set" if empty value in the row
This question has an accepted answers - jump to answer
Hi @inajaf ,
Have a look at the columns.render documentation, I think it should provide what you are looking for.
If you can't get it to work, could you please link to a test case. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
I found the parameter for the default value https://datatables.net/reference/option/columns.defaultContent, but I have some issues for applying it to my current code, I need to add some fields in options that could be empty or null and set the default value: "Not set".
Here is a link to my current js file live.datatables.net/zecewuhi/1/
I need for Example "Additional phone number, Trailer Number" that could be null or empty and set them to "Not Set".
As Sandy said, use columns.render, see "Ashton Cox" in this example,
It looks like you're new here. If you want to get involved, click one of these buttons!
DataTables designed and created by SpryMedia Ltd.
SpryMedia Ltd is registered in Scotland, company no. SC456502.