Urgent Using Colvis with save state and indiviual column search on top creates issue.?

Urgent Using Colvis with save state and indiviual column search on top creates issue.?

muhammad_akifmuhammad_akif Posts: 8Questions: 4Answers: 1

http://live.datatables.net/forayapi/8/edit
here is my code when i hide some column then savestate and reload page then on showing hidden columns disable search on specific that column !!! kindly please give me a solution its very urgent.

This question has an accepted answers - jump to answer

Answers

  • muhammad_akifmuhammad_akif Posts: 8Questions: 4Answers: 1
    edited January 2017

    hey Allan are you there kindly give me a solution !!

  • muhammad_akifmuhammad_akif Posts: 8Questions: 4Answers: 1
    Answer ✓

    i got a solution here is my solution
    $('#example').on('column-visibility.dt', function (e, settings, column, state) {
    if (state === true) {
    registerEventListener();
    }
    });

        function registerEventListener() {
          table.columns().every(function (index) {
            $('input ', this.footer()).off().on('keyup change', function () {
              table.columns($(this).parent().index() + ':visible')
                .search(this.value)
                .draw();
            });
          });
        }
        registerEventListener();
    
This discussion has been closed.