ColReorder, ColVis and ColumnFilter autoSave problem and solution

ColReorder, ColVis and ColumnFilter autoSave problem and solution

miguelfcmiguelfc Posts: 2Questions: 0Answers: 0
edited July 2013 in Plug-ins
Hi there,

First of all, thank you Allan for this great product, datatables is the greatest data table plugin I have found ever!

I am working with ColVis, ColReorder and column-filter, and the following was happening to me:

1. Activated bAutoSave, using ColRorder and ColVis
2. Defined a column (say A) as select type, and another (say B) as text type.
3. Reorder both columns.
4. Reload the Site
5. The select filter is shown below column B and the text filter below column A.

What I did to fix it was this:

- Defined a property named bUseColReorder (the same type as bUseColVis).
- Just before the line:[code]$(aoFilterCells).each(function (index) {//fix for ColVis[/code], I added the following block (extracted from ColReorder github):

[code]if (properties.bUseColReorder) {
var aColumnOrder = [];
for ( var counter=0, counterLen = oTable.fnSettings().aoColumns.length ; counter
This discussion has been closed.