Show/Hide columns
Show/Hide columns
extjac1
Posts: 3Questions: 1Answers: 0
for table page-length and page order, I use below code genally,
<table class="table dt " data-page-length="25" data-order='[[ 5,"asc" ]]'>
is there anything like this for show/hide columns....like a data-visible="[0,2,3]"
<table class="table dt " data-page-length="25" data-order='[[ 5,"asc" ]]' data-visible="[0,2,3]">
This question has an accepted answers - jump to answer
Answers
There is
columns.visible
. You probably will usecolumnDefs
. Haven't tried it but I think something like this will be close:Kevin
Thanks Kevin...tried that but did not work.
Sorry guess I should have looked at the HTML5 data attribute docs first You apply the
columns
options on theth
tag, like this:http://live.datatables.net/pivoziqe/1/edit
Kevin
thank you! this is what i was looking for