Open GoogleCodeExporter opened 9 years ago
[deleted comment]
// deleted my previous comment because it wouldn't work for column index 0
Hello,
I just started using this library today, so I don't know if this is the best
way to do it. I also don't actually know what bUseColVis does. Anyway, I
needed this done so I changed the _fnColumnIndex function and now you can
specify "iFilterColumn" in aoColumns, and it works on hidden columns. Only
tested in Firefox on client side tables.
....
"aoColumns": [
null,
{'type': 'text'},
null,
{
'type': 'select',
'values': [
{'value':'is_approved', 'label': 'Approved'},
{'value':'not_approved', 'label': 'Not Approved'}
],
'iFilterColumn': 2
},
...
function _fnColumnIndex(iColumnIndex) {
if (properties.bUseColVis) {
// this if is the new part
if (typeof properties.aoColumns[iColumnIndex].iFilterColumn !== 'undefined'){
return properties.aoColumns[iColumnIndex].iFilterColumn;
}
return iColumnIndex;
} else {
return oTable.fnSettings().oApi._fnVisibleToColumnIndex(oTable.fnSettings(), iColumnIndex);
}
}
Criticism welcome.
Jared
Original comment by Jared.Be...@gmail.com
on 10 Dec 2013 at 10:15
Original issue reported on code.google.com by
alexande...@gmail.com
on 21 May 2013 at 1:43Attachments: