Populating table

Populating table

susersuser Posts: 68Questions: 18Answers: 0

I try this https://datatables.net/extensions/buttons/examples/html5/simple.html
now the problem is when i hard code table liket his

-<table id="tabledata"  style="width:100%;">
                <thead>
                    <tr>
                        <td>Nmae1</td>
                        <td>&Nmae3;</td>
                        <td>&Nmae4;</td>

                    </tr>
                </thead>
           
            <tr>
                <td>&asd;</td>
                <td>&nbasdsp;</td>
                <td>&nbasdsp;</td>
                </tr>
            <tr>
                <td>&nbasdsp;</td>
                <td>&nbsasdp;</td>
                <td>&nbsadp;</td>
                </tr>
                <tr>
                    <td>&nbasdsp;</td>
                    <td>&nbsasdp;</td>
                    <td>&nbsadp;</td>
                </tr>
                
            </table>

then this perfectly works but when i just use this

<table id="tabledata"   cellspacing="0"  class="inner_table">
    
   </table>

but when i populate table through jquery and web static method like this
```
success: function (result) {
var final = JSON.parse(result.d).response;

             console.log(JSON.parse(result.d).response);
             $("#tabledata").empty();

             if (final.length > 0) {
                 $("#tabledata").append(
          "<thead><tr><th>ID</th><th>Owner</th><th>RegNo</th></tr></thead>");

                 for (var i = 0; i < final.length; i++) {

                     if (final[i] !== null) {
                         $("#tabledata").append("<tbody><tr><td>" +
                                             final[i][0] + "</td> <td>" +
                                             final[i][1] + "</td> <td>" +
                                             final[i][2] + "</td></tr></tbody>");

                     }
                 }

                 $("#pdf").show();
                 $("#excel").show();
             }

```

then buttons not visible when i use this

how to solve

This discussion has been closed.