Bootstrap with datatable showing empty first row

Viewed 27

My datatable is displaying with an empty first row when it is not sorted. Once I sort the rows, the empty row either stays where it was, or moves to the end, depending on which row I am sorting. The source of the data does not have any empty rows (SQL DB). How do I get rid of that first row, of have it not show up at all. Here is my code.

    <script type="text/javascript">
    $(document).ready(function () {
        $(document.getElementById('<%= personalFilesGV.ClientID %>')).hide($(this).find("th:eq(0)")).dataTable(
            {
                "dom": '<fliptp>',
                "deferRender": true,
                "processing": true,
                stateSave: true,
                "columnDefs": [
                { "type": "date", "targets": 2 },
                    
                    { "order": [[2, 'asc']] }
                ],
                columns: [
                    { title: 'Provider Name' },
                    { title: 'Document Name' },
                    { title: 'Expiration Date' },

                ],
            }
        );
    })
</script>

This is the resulting source code

<tr>
        <th scope="col">&nbsp;</th><th scope="col">&nbsp;</th><th scope="col">&nbsp;</th>
    </tr><tr>
        <td>
                                                <div class="container-fluid">
                                                    <div class="row">
                                                        <div class="col-md-12">
                                                            <span id="ContentPlaceHolder1_personalFilesGV_providerNameLb_0">Blah Blah</span>
                                                        </div>
                                                    </div>
                                                </div>
                                                </div>

                                            </td><td>
                                                <div class="container-fluid">
                                                    <div class="row">
                                                        <div class="col-md-7">
                                                            <span id="ContentPlaceHolder1_personalFilesGV_providerNameLb_0">Best Practices</span>
                                                        </div>
                                                    </div>
                                                </div>
                                                </div>

                                            </td><td>12-14-2021</td>
    </tr><tr>
        <td>
0 Answers
Related