Uncaught TypeError: Cannot set property '_DT_CellIndex' of undefined on simple table

Uncaught TypeError: Cannot set property '_DT_CellIndex' of undefined on simple table

Seeker401Seeker401 Posts: 2Questions: 1Answers: 0

Hello, I am building this simple table to test DataTables and am running into the "Uncaught TypeError: Cannot set property '_DT_CellIndex' of undefined" error. I checked table headers ..ect and all seems ok, does anyone see an error? thank you very much for you time!

<html>
<head>
<title>DataTables Test </title>

  <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.10.18/datatables.min.css"/>
  <script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"> </script>
  <script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.10.18/datatables.min.js"></script>

  <script type="text/javascript">
     $(function() {
        $('#mattertable').dataTable();
     });
  </script>

</head>
<body>

     <table id="mattertable" border="1">
        <thead>
            <tr>
               <th>Co</th>
               <th>Name</th>
               <th>UID</th>
               <th>BMSID</th>
               <th>EMAIL</th>
               <th>LDAP</th>
               <th>Added To Prs.</th>
            </tr>
        </thead>
        <tbody>
            <tr bgcolor=#F3F781>
                <td bgcolor=#33afff><b>1</b></td>
                <td>Daniel KOLACKO</td>
                <td>kolackod</td>
                <td>00106544<input type='hidden' name='bmsid' value='00106544'></td>
                <td>Daniel.Kolacko@bms.com</td>
                <td>TERMED</td>
                <td>2015-11-30</td>
            </tr>
            <tr bgcolor=#FFFFFF>
                <td bgcolor=#33afff><b>2</b></td>
                <td>Darrell Drennan</td>
                <td>drennand</td>
                <td>00302401<input type='hidden' name='bmsid' value='00302401'></td>
                <td>Darrell.Drennan@bms.com</td>
                <td>TERMED</td>
                <td>2015-11-25</td>
            </tr>
            <tr bgcolor=#F3F781>
                <td bgcolor=#33afff><b>3</b></td>
                <td>Michael Furlong</td>
                <td>furlonme</td>
                <td>00314055<input type='hidden' name='bmsid' value='00314055'></td>
                <td>Michael.Furlong2@bms.com</td>
                <td>ACTIVE</td>
                <td>2015-09-04</td>
            </tr>
            <tr bgcolor=#FFFFFF>
                <td bgcolor=#33afff><b>4</b></td>
                <td>Annie Sturgess</td>
                <td>sturgesa</td>
                <td>00319076<input type='hidden' name='bmsid' value='00319076'></td>
                <td>Annie.Sturgess@bms.com</td>
                <td>ACTIVE</td>
                <td>2015-11-25</td>
            </tr>
            <tr bgcolor=#F3F781>
                <td bgcolor=#33afff><b>5</b></td>
                <td>Sanjeev Majoo</td>
                <td>majoos</td>
                <td>00324339<input type='hidden' name='bmsid' value='00324339'></td>
                <td>Sanjeev.Majoo@bms.com</td>
                <td>ACTIVE</td>
                <td>2015-09-04</td>
            </tr>
            <tr bgcolor=#FFFFFF>
                <td bgcolor=#33afff><b>6</b></td>
                <td>Christopher Johnson</td>
                <td>johnsc29</td>
                <td>00364339<input type='hidden' name='bmsid' value='00364339'></td>
                <td>Christopher.Johnson@bms.com</td>
                <td>ACTIVE</td>
                <td>2015-09-04</td>
            </tr>
            <tr bgcolor=#F3F781>
                <td bgcolor=#33afff><b>7</b></td>
                <td>William Novotny</td>
                <td>novotnyw</td>
                <td>00370330<input type='hidden' name='bmsid' value='00370330'></td>
                <td>William.Novotny@bms.com</td>
                <td>TERMED</td>
                <td>2015-11-30</td>
            </tr>
            <tr bgcolor=#FFFFFF>
                <td bgcolor=#33afff><b>8</b></td>
                <td>Margaret Leahey</td>
                <td>leaheym</td>
                <td>00389208<input type='hidden' name='bmsid' value='00389208'></td>
                <td>Margaret.Leahey@bms.com</td>
                <td>ACTIVE</td>
                <td>2015-11-25</td>
            </tr>
            <tr>
                <td bgcolor=#33afff colspan='7' align='center' style='height:50px; width:50px'><input type='submit' value='Submit Updates'></td>
            </tr>
        </tbody>
   </table>
</body>

</html>

Answers

  • Seeker401Seeker401 Posts: 2Questions: 1Answers: 0

    I found the error thanks, DataTables does not like the submit button

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    Its not so much the submit button as the colspan. You can't have a colspan or rowspan in the tbody of a DataTable at this time I'm afraid.

    Allan

This discussion has been closed.