How can i create two columns for one table?
How can i create two columns for one table?
anivaries
Posts: 5Questions: 2Answers: 0
I've been trying to figure it out but i just can't. I have this table with only one column which is paginated ( every 15 tr ) but i want to show like 30 trs in two columns, to fill empty space and make less pages
I figured there is some way to do it with odd
and even
. I tried "<'row'<'col-6 odd'tr><'col-6 even'>>"
but that doesn't work, it just puts everything in the 2nd col
This question has an accepted answers - jump to answer
Answers
For Datatables you will need to define two headers (
th
) in HTML. If your table is DOM sourced then you will need to populate the two columns with the data you want. If this doesn't help then please provide more details of how your table data is populated and your Datatables initialization code.Kevin
Yes, i have title of this list as
th
which seems to work fine, i did some css and html changes on it. I populated datatables with Django for loop in html.And this is html code
If you want Django to build the HTML table then you will need to have Django build two
th
in the header and populate the to columns in thetbody
. The result should look similar to this example. Click the HTML tab.Kevin
Yeah, seems like this is more of a Django / HTML issue than datatables. I just need to make Django make different columns for each odd/even loop