Table as a "matrix"
Table as a "matrix"
malinovski
Posts: 10Questions: 2Answers: 0
hi all,
i have a database table with this kind of records:
A | B | C fields with A containing a name, B a date and C a value;
I need to show the names in A as a kind of header (each name once, and starting from second column) and then dates in B as first column, such data for each date i have the values of C for each A
I hope i've been clear enough, how can i achieve that?
i leave a pic as example
thank you
This discussion has been closed.
Answers
Hi @mailinovski ,
You would need to pre-parse the data first. You can run an
ajax
query first, manipulate the data into the format you present above, then pass that intodata
during the table initialisation.Cheers,
Colin
thanks @colin , i am quite new to datatables, can you give me some other "hints" to start?
thanks
Hi @malinovski ,
This example may help. It's showing how you can initiate an Ajax call, then feed that into DataTables - for you, you would need to do that manipulation prior to the load.
Cheers,
Colin
but, in case i need to do serverside processing, how does the scenario change?
Then the server would need to send back the data in the expected format.
wait... i'm really a very a beginner... whats the exact order of steps concerning
ajax call, arraning data, serverside processing and other (if i am missing something else) ?