Change table headers dynamically
Change table headers dynamically
Khalid Teli
Posts: 251Questions: 71Answers: 0
Hi
I am changing the table headers dynamically based on the three text box values as shown in the example below
live.datatables.net/fixihuba/1/edit
if you input T1= 'A', T2= 'B' and T3 = 'C', the table header names will be changed to these values.
1) Is there an inbuilt method in editor where I can change the table header by clicking on the table header and change it?(much like normal inline editing)?
2) if not, how can I apply the changes just to be effective for particular selection. For example , in the dropdowm menu if I choose name as Ashton Cox and T1= 'A', T2= 'B' and T3 = 'C' , the header names should only apply for table when the names Ashton Cox is selected ?
Thank you
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
There is nothing builtin to change the header names. You will need to use jQuery or other standard Javascript methods to change the names. Here is a very simple example:
http://live.datatables.net/dimaxupi/1/edit
Kevin
@kthorngren Thank you