Responsive example Custom child row renderer

Responsive example Custom child row renderer

phaladishaun@gmail.comphaladishaun@gmail.com Posts: 5Questions: 0Answers: 0

This is failing to render the toggle options kindly assist...

Replies

  • phaladishaun@gmail.comphaladishaun@gmail.com Posts: 5Questions: 0Answers: 0

    the datatable am using is located here
    https://datatables.net/examples/server_side/row_details.html

  • tangerinetangerine Posts: 3,348Questions: 36Answers: 394

    What do you mean by "Custom child row renderer"?
    The example you link to is working, so presumably something is wrong with your own code. If you don't show your code, nobody can help.

  • phaladishaun@gmail.comphaladishaun@gmail.com Posts: 5Questions: 0Answers: 0

    I just took the code as it is from datatables.net, and even used their online references, what does not render is the toggle buttons on the right

  • allanallan Posts: 61,665Questions: 1Answers: 10,096 Site admin

    The example you linked to appears to work okay for me, as it is for tangerine.

    We'd need a link to a page showing the issue to be able to offer any help.

    Allan

  • phaladishaun@gmail.comphaladishaun@gmail.com Posts: 5Questions: 0Answers: 0

    Find example at smartbidder.co.bw/test_table.html

    Below is my source code

    <script src="//code.jquery.com/jquery-1.12.4.js"></script>
    <script src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>
    <script src="https://cdn.datatables.net/responsive/2.1.1/js/dataTables.responsive.min.js"></script>
        
    <script type="text/javascript">
    $(document).ready(function() {
        $('#example').DataTable( {
            responsive: {
                details: {
                    type: 'column',
                    target: 'tr'
                }
            },
            columnDefs: [ {
                className: 'control',
                orderable: false,
                targets:   0
            } ],
            order: [ 1, 'asc' ]
        } );
    } );
    </script>   
    <link rel="stylesheet" href="https://cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css"/>
    <link rel="stylesheet" href="https://cdn.datatables.net/responsive/2.1.1/css/responsive.dataTables.min.css"/>
    <table id="example" class="display nowrap" cellspacing="0" width="100%">
            <thead>
                <tr>
                    <th></th>
                    <th>First name</th>
                    <th>Last name</th>
                    <th>Position</th>
                    <th>Office</th>
                    <th>Age</th>
                    <th>Start date</th>
                    <th>Salary</th>
                    <th>Extn.</th>
                </tr>
            </thead>
            <tfoot>
                <tr>
                    <th></th>
                    <th>First name</th>
                    <th>Last name</th>
                    <th>Position</th>
                    <th>Office</th>
                    <th>Age</th>
                    <th>Start date</th>
                    <th>Salary</th>
                    <th>Extn.</th>
                </tr>
            </tfoot>
            <tbody>
                <tr>
                    <td></td>
                    <td>Jena</td>
                    <td>Gaines</td>
                    <td>Office Manager</td>
                    <td>London</td>
                    <td>30</td>
                    <td>2008/12/19</td>
                    <td>$90,560</td>
                    <td>3814</td>
                </tr>
                <tr>
                    <td></td>
                    <td>Charde</td>
                    <td>Marshall</td>
                    <td>Regional Director</td>
                    <td>San Francisco</td>
                    <td>36</td>
                    <td>2008/10/16</td>
                    <td>$470,600</td>
                    <td>6741</td>
                </tr>
            </tbody>
        </table>
    
  • phaladishaun@gmail.comphaladishaun@gmail.com Posts: 5Questions: 0Answers: 0

    I managed to solve the problem it was working all along...it did not show maily because all my rows were visible.no row was hidden

  • allanallan Posts: 61,665Questions: 1Answers: 10,096 Site admin

    Good to hear its sorted out now. Thanks for posting back!

    Allan

This discussion has been closed.