How do I change column titles based on the data received from Ajax

How do I change column titles based on the data received from Ajax

ankurvjyankurvjy Posts: 1Questions: 1Answers: 0

I am including a reload button in my DataTable that does table.ajax.reload(). I want to change the column name once I receive this data. I have an integer column in the title of which I always want to indicate the sum of all values in that column.
For example if the column title was Foo and the values loaded were [3,4,5] then I would like my column title to become Foo [12]. How can I do this?

This discussion has been closed.