Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82804

How to increase datatables Column Limit of 12

$
0
0

Hi

I am producing a table for payments in the 12 months of the year Jan - Dec, but need to include 2 further columns for share and portfolio, making a total of 14 columns, using Wordpress PHP snippet and MySQL tables.

The table is being limited to 12 columns, is there a way to remove this limitation.

Extracts of the code shown below

<table id="pay-grid" class="" style="width:100%">

<thead>
<tr>
<th>Group</th>
<th>Code</th>
<th>Jan</th>
<th>Feb</th>
<th>Mar</th>
<th>Apr</th>
<th>May</th>
<th>Jun</th>
<th>Jul</th>
<th>Aug</th>
<th>Sep</th>
<th>Oct</th>
</tr>
</thead> ... etc

foreach ($rows as $row ){
    echo "<tr>";
    echo "<td>$row->Group</td>";
    echo "<td>$row->Code</td>";
    echo "<td>$row->Jan</td>";
    echo "<td>$row->Feb</td>";
    echo "<td>$row->Mar</td>";
    echo "<td>$row->Apr</td>";
    echo "<td>$row->May</td>";
    echo "<td>$row->Jun</td>";
    echo "<td>$row->Jul</td>";
    echo "<td>$row->Aug</td>";
    echo "<td>$row->Sep</td>";
    echo "<td>$row->Oct</td>";
    echo "</tr>";}
echo "</table>";
?>
<script type="text/javascript"   src="https://cdn.datatables.net/1.10.15/js/jquery.dataTables.min.js"></script>
<script type="text/javascript"   src="https://cdn.datatables.net/buttons/1.5.2/js/dataTables.buttons.min.js"></script>
<script type="text/javascript"   src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.flash.min.js"></script>
<script type="text/javascript"   src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.print.min.js"></script>
<script type="text/javascript">
(function($) { .....etc.

This tables works, but as soon as I add Nov, Dec this takes the system > 12 columns, and simply ignores those extra columns in the output.

See attachment for the output, I can provide more code if you need it.

Many Thanks

Colin


Viewing all articles
Browse latest Browse all 82804

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>