Filter DDlist not working if "bStateSave": true gives error in jquery.datatables.columnfilter.js

Filter DDlist not working if "bStateSave": true gives error in jquery.datatables.columnfilter.js

dsouzasuvarnadsouzasuvarna Posts: 3Questions: 1Answers: 0

I have created the list by using Datatable in asp.net MVc application.
Used searching, sorting, pagination, fixed header, Filtering and show/hide functions of data table.
To retain the selected / typed values in Filter & Search I have made changes to “jquery.datatables.js” file "bStateSave": true,
After making changes to the above file, I have received error as "Uncaught TypeError: Cannot read property 'length' of undefined" in jquery.datatables.ColumnFilter.js on line if (bIgnoreEmpty == true && sValue.length == 0) continue;

Beacuse of this error Filtering for the some of the dropdownlist is disabled.

Answers

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    I have made changes to “jquery.datatables.js” file

    Why?

    You can set stateSave in your table's initialisation:

            stateSave: true
    
  • dsouzasuvarnadsouzasuvarna Posts: 3Questions: 1Answers: 0

    Even i did stateSave: true in table's initialisation as well but no luck

  • dsouzasuvarnadsouzasuvarna Posts: 3Questions: 1Answers: 0

    StateSave is working but that disables my columnfilter select and when i Do Inspect Element I get "Uncaught TypeError: Cannot read property 'length' of undefined" in jquery.datatables.ColumnFilter.js on line if (bIgnoreEmpty == true && sValue.length == 0) continue;

This discussion has been closed.