How to set conditions on what data will be displayed?
How to set conditions on what data will be displayed?
patreeeeek
Posts: 14Questions: 7Answers: 0
I have a datatable, data came from a json file.
It has a column as follows:
CONTACT_NO,CONTACT_NAME, CONTENT,DATE_RECEIVED
is there any way to do an if statement in rendering the data?
that if CONTACT_NAME is empty or null
the CONTACT_NO will be displayed else the CONTACT_NAME
This discussion has been closed.
Answers
Hi @patreeeeek ,
You can use
columns.render
for that - the fifth example has something along the lines of what you want.Cheers,
Colin
Hi @colin ,
I've done this one.
My problem now is my datatable has too many data.
Is there any way to load the datatable per page?
Hi @patreeeeek ,
Yep, you can use
serverSide
for that - this page of the FAQ discusses several approaches to speed up the processing.Cheers,
Colin