DataTables - Node JS - HEADER + Many rows
DataTables - Node JS - HEADER + Many rows

Good Morning,
I would like to use datatable for my project. The idea is to have many data table like lot, provider etc etc where i've make a control quality form.
I would like to have a header that will be an incremental number with other information about the lines etc etc and the many rows linked to the header number ...
looking into the examples i didn't found it ...
i see something similar related to the check box but nothing related to what i'm looking for,
thanks in advanced,
best regards,
Andrea
Answers
Sounds like you want to build dynamic table header. You can use Datatables to build the
thead
withcolumns.title
. However you need to build a variaible with thecolumns.title
definitions before initializing Datatables. Here is an example:http://live.datatables.net/huyexejo/1/edit
It derives the header names from the keys of the first object in the data. Instead of doing this you could return a data object that contains the columns names.
Is this what you are looking for?
Kevin
Good Afternoon Kevin, first of all thanks for your precious support. I'll try to give a better view what i would like to achieve:
Order:
* IDOrder
* OrderDate
* IDProduct
* Qty
In my datatable I would like to have something like that:
Date: 09/10/2019
Order: 1
ID DESCRIPTION QTY
1 PEN 3
3 PAPER 4
4 CUTTER 1
.... N
In this case 1 order correspond N Products ...
I would XX row when i needed once added will be display into the relative datatable
Best Regards,
Andrea
Just an example about what i mean ... imagine that the user click on a row and insert to product
Still not exactly clear on what you want. Maybe the Inline Editor is something you are looking for. Here is an example:
https://editor.datatables.net/examples/inline-editing/simple.html
You can build the Datatable around your order form example.
Kevin
Hi @gnux8 ,
Do you mean something like this where the row has a counter?
Cheers,
Colin