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

Datatables to nested HTML Tables

$
0
0
I was working on a problem where a tool is generating a html dynamically and to make it a bit interactive i thought of using dataTables magic. With a good start , i got stuck in a problem -

The html is having nested tables (tables within tables) and my question is - Is there any way to subsume datatables on my html. I tried but it is giving an error - nCell is undefined .

What can i do about it ?
Sample html -
<script type="text/javascript">
       $(document).ready(function() { $('#table_id,#id2').dataTable();} );
 </script>
  
</head>
<body text="#000000" link="#000000" alink="#000000" vlink="#000000">
<table id="table_id">
    <thead> 
        <tr>
        <th> AAA</th>
            <th> gfff</th>
            <th> fgfgf</th> 
        </tr>
   </thead>  
    <tbody>
        <tr>
            <td>Row 1 Data 1</td>
            <td>Row 1 Data 2</td>
            <td>etc</td>
        </tr>
        <tr>
            <td>Row 2 Data 1</td>
            <td>Row 2 Data 2</td>
            <td>etc</td>
        </tr>
        <tr>
           <td> <table id ="id2">
                <thead>
                   <tr>
                       <th>sfdsfsdf</th>
                        <th>ffdfs</th>
                   </tr> 
                 </thead>
                 <tbody>
                     <tr>
                         <td>dzsfdfs</td>
                         <td>ddddddd</td>
                     </tr>
                     
                 </tbody>
            </table>
           </td>
        </tr>
    </tbody>
</table>
</body>

Viewing all articles
Browse latest Browse all 82132

Trending Articles



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