Sorting with jquery.dataTables.js and jquery.dataTables.columnFilter bug

0

1 Hello, friends I'm trying to put the filter in the first row of the table head, it almost worked if not for the fact of the ordering, as I show in the image. The sort cells must be in the first header that does not have the text boxes. I'm using the jquery.dataTables.js Plugins and the jquery.dataTables.columnFilter.js filters

Someone can help.

Code below

<table id="example" class="display">
    <thead>
        <tr>
            <th style="width:150px">Company name</th>

            <th style="width:350px">Date Created</th>
            <th style="width:250px">Date Updated</th>

        </tr>
        <tr>
            <th>Company name</th>

            <th>Date Created</th>
            <th>Date Updated</th>
        </tr>
    </thead>

    <tbody>
        <tr>
            <td>Emkay Entertainments</td>

            <td>28/05/2011</td>
            <td>25/08/2011 00:00:00</td>
        </tr>
        <tr>
            <td>The Empire</td>


            <td>16/06/2011</td>
            <td>10/07/2011 00:00:00</td>
        </tr>
        <tr>
            <td>Asadul Ltd</td>

            <td>13/07/2011</td>
            <td>12/09/2011 00:00:00</td>

        </tr>![inserir a descrição da imagem aqui][2]
 </table>



 $(document).ready(function() {
            $('#example').dataTable(
                )
                .columnFilter({
                    sPlaceHolder: "head:before",
                    aoColumns: [
                        { type: "text" },
                        { type: "text" },
                        { type: "text" },
                    ]
                });
        });

[2]:

    
asked by anonymous 25.08.2014 / 18:33

1 answer

1

I have decided to put this property "bSortCellsTop": true in the DataTable function.

$(document).ready(function () {
        $('#tbConvenios').dataTable({
            "bSortCellsTop": true
            })
      .columnFilter({
          sPlaceHolder: "head:before",
          aoColumns: [{ type: "text" },
                      { type: "text" },
                      { type: "text" },
                      { type: "text" }
          ]
      });
    });
    
27.08.2014 / 15:19