scroller with column filtering not use

scroller with column filtering not use

kqueekqueekqueekquee Posts: 40Questions: 1Answers: 0

http://live.datatables.net/efuyaj/120/edit ( exemple )

hello when I add 'scrolly: 350px' option in my datatable filtering columns no longer works. how is it to allow filtage parameterize data with the scrolly option?

Merci

Answers

  • kqueekqueekqueekquee Posts: 40Questions: 1Answers: 0

    search column in thead th not working

    http://live.datatables.net/efuyaj/126/edit

    '''js
    $(document).ready( function () {

    // Paramètrage - ajoute une zone de saisie pour recherche dans le footer
    $('#example thead th').each(function() {
    var title = $('#example thead th').eq($(this).index()).text();
    $(this).html('<input class="form-control" type="text" placeholder="' + title + '" />');
    });

    var table = $('#example').DataTable( {
      "scrollY": "350px",
      "scrollX":true,
      "dom": "lfrtipS",
      "bPaginate":true, 
      "pagingType": "full_numbers",
      "deferRender": true,
      "iDisplayLength": -1,
      "lengthMenu": [[1, 5, 10, 20, 1000, 2500, -1], [1, 5, 10, 20, 1000, 2500, "Tous"]],
                "language":
                  {
                    "emptyTable": "Aucun enregistrment dans la table",
                    "info": "Affiche _START_ à _END_ sur _TOTAL_ enregistrement(s)",
                    "infoEmpty": "Affiche 0 à 0 sur 0 enregistrement(s)",
                    "infoFiltered": "(filtered from _MAX_ total entries)",
                    "infoPostFix": "",
                    "decimal": ".",
                    "thousands": " ",
                    "lengthMenu": "Afficher _MENU_ enregistrement(s)",
                    "loadingRecords": "Chargement...",
                    "processing": "Traitement...",
                    "search": "Rechercher ",
                    "zeroRecords": "Aucun élément à afficher",
                    "paginate": {
                      "first": "|<",
                      "last": ">|",
                      "next": ">",
                      "previous": "<"
                    },
                    "aria": {
                      "sortAscending": ": activer pour trier la colonne par ordre croissant",
                      "sortDescending": ": activer pour trier la colonne par ordre décroissant"
                    }
                  }
    

    } );

       // Appliquer le filtre
      $("#example thead input").on('keyup change', function() {
        console.log(this.value);
        table
                .column($(this).parent().index() + ':visible')
                .search(this.value)
                .draw();
      });
    

    } );
    '''

This discussion has been closed.