Dropdown menu for Individual column searching not working after vertical scroll using fixedheader

Dropdown menu for Individual column searching not working after vertical scroll using fixedheader

Frank10Frank10 Posts: 2Questions: 1Answers: 0
edited November 2016 in Free community support

I have used datatables for my project which works absolutely fine except when I scroll vertical (with header fixed) and try to use the dropdown (of each columns), it fails to filter and doesn't work.
And also with the dropdown open if I scroll vertically, the dropdown goes off the screen.
I have used fixedHeader 3.1.2
Please help me to solve this !

This question has accepted answers - jump to:

Answers

  • daniel_rdaniel_r Posts: 460Questions: 4Answers: 67
    Answer ✓

    You can also use my yadcf plugin which support fixedHeader as well... see showcase

  • Frank10Frank10 Posts: 2Questions: 1Answers: 0
    edited November 2016

    Thanks a lot for your reply.
    I am unable to implement the plugin correctly and I am using yadcf 0.9.0 and datatable 1.10.

    I am getting the Uncaught Typeerrors saying -
    "cannot read property 'length' of undefined" jquery.datatables.yadcf.js:575
    "cannot read property 'undefined' of undefined" jquery.datatables.yadcf.js:3497

    Uncaught ReferenceError: yadcf is not defined when I used -

    Example.getDataTable = function(id) {
        var dataTable = $('#' + id).DataTable({
            "bPaginate": true,
            "bLengthChange": false,
            "bInfo": false,
            "bAutoWidth": false,
            "bFilter": true,
            "iDisplayLength":"All",
            "pageLength":-1,
            "fixedHeader": {header: true, headerOffset: 40},
            "orderCellsTop": true,
            "aaSorting": [[1, 'asc']],
            "aoColumnDefs": [{'bSortable': false, 'aTargets': [ 0 ]}],
            "stripeClasses" : [],
            "sDom": 'rt' // to show only table on page
        });
        yadcf.init(dataTable);
        return dataTable;
    };
    

    Can you please guide me ?

  • daniel_rdaniel_r Posts: 460Questions: 4Answers: 67
    Answer ✓

    You need to provide second argument (array of objects)
    Like in the following code

    yadcf.init(dataTable,[{column_number: 0 }]);

    Look at the showcase and the docs (inside js file)

This discussion has been closed.