what is the equivalent of row.add() to control the column header values?
what is the equivalent of row.add() to control the column header values?
what is the equivalent of row.add() to control the column header values?
For my reference, I have in my data table
DeviceName1 85% 87% 75% 63%
DeviceName1 85% 87% 75% 100%
DeviceName2 85% 85% 74% 70%
DeviceName3 80% 81% 70% 66%
DeviceName4 78% 82% 70% 74%
DeviceName5 77% 75% 68% 58%
DeviceName6 77% 72% 66% 58%
and if I go into my console log I can do the following:
oTable.row.add( {DeviceName: "DeviceName1", counter1: "85%", counter2: "87%", counter3: "75%", counter4: "100%"}).draw();
and a new row will be added
EDIT1 -think table().header() is what I am looking for<br>
EDIT2 - some examples here that might be useful
EDIT3 -
what i am looking for is the equivalent of this
but don't think it exists
so this might be the way to go
a solution here enables me to clone the existing header
Answers
I think I am approaching this the wron way.
I am looking at being able to dynamically draw the headers.
So as I have been advised, I have to create a class that can be initiliised and then when I get the headers values I can the pass them into the class e.g.
t1.addHeaders(ch)
and then the headers will be drawn. see here for a similar question I posted.