Hide column with custom command.
-
Looking thru the forum I found a few answers to what I was trying to do. Here’s the rub: The answers are over a year old and using the EXACT same method I’m getting an error in the JS for datatables now..
Like others I need to hide a column but still have it searchable. I have this in the custom commands field for the table:
“columnDefs”: [ { “visible”: false, “targets”: [ 3 ] } ]
intending to hide column 3 (4th column starting count at 0).
This now breaks the JS for tablepress. I get the following error in the browser:
TypeError: undefined is not an object (evaluating ‘i._DT_CellIndex={row:b,column:l}’)
Jajquery.datatables.min.js:23:174
Njquery.datatables.min.js:15:231
(anonymous function)jquery.datatables.min.js:15:343
(anonymous function)jquery.js:1:927
mapjquery.js:1:3717
mapjquery.js:1:894
majquery.datatables.min.js:15:310Just the first few lines in the call stack.
Any hep would be fantastic.
RB
- The topic ‘Hide column with custom command.’ is closed to new replies.