How to set defaultContent if data is empty string
How to set defaultContent if data is empty string
![wicebu](https://secure.gravatar.com/avatar/53b51e2024e620d5341c3c9cd3ef4bdd/?default=https%3A%2F%2Fvanillicon.com%2F53b51e2024e620d5341c3c9cd3ef4bdd_200.png&rating=g&size=120)
Hi there.
I'm working on a datatable where data is empty ""
and some times data is null
, I need to show defaultContent
for both of the cases. Datatables handle case of null
pretty well.
How I can set datatables to show defaultContent
for empty string as well.
This discussion has been closed.
Answers
Hi @wicebu ,
Another way that you could make work for both is to use
columns.render
- you can set the data to be whatever you like.Cheers,
Colin
Yes, I did the same.