Sorting on hidden columns

Sorting on hidden columns

SxChocSxChoc Posts: 6Questions: 0Answers: 0
edited May 2013 in General
Hi,

I've configured a datatable with various column filters, my clients have now asked me to hide some of the columns but they still what to be able to filter on them.

So my 'aoColumns' is as such

"aoColumns" : [null,null,null,{ "aDataSort": [10,0], "aTargets" : [3] },null,null, null, null, null,{ "iDataSort": 11 }, {"bVisible": false}, {"bVisible": false}],

(The last couple of columns are hidden, which I'm using to sort on dates, etc). And my filters are :

.columnFilter({ sPlaceHolder: "head:before",
aoColumns:
[
{ sSelector: "#titleFilter", type: "text" },
{ sSelector: "#practiceFilter", type: "string"},
{ sSelector: "#typeFilter", type: "select", values : ["Conference", "Course", "Webinar"] },
{ sSelector: "#dateFilter", type: "date-range" },
{ sSelector: "#regionFilter", type: "string"},
{ sSelector: "#cityFilter", type: "string"},
{ sSelector: "#cpdFilter", type: "number-range"}
]
});

Now if I hide the second column (using "bVisible" :False), the whole of my filtering goes mental (!) is there anyway way around this does anyone know?

Thanks,
Craig

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    I think this is a known issue in that particular 3rd party plug-in. It doesn't cope with hidden columns. It needs to translate from visible column index to column data index and isn't doing that: http://code.google.com/p/jquery-datatables-column-filter/issues/detail?id=88 .

    Allan
This discussion has been closed.