Formatting table with a few options (version 2)
Formatting table with a few options (version 2)
Hello and thank you to anyone that helps me with this problem...
I thought I had this solved but I guess I missed on one important part.. I was able to hide the 7th column like I wanted to but by doing it the way I did (see code below) I also hid it from being seen when I want to "view page source".
anyone knows how to hide a column but still have it visible to be viewed when using "view page source".
Again thanks for any help you can provide...
$(document).ready(function () {
var table = $('#myTable').DataTable({
responsive: true,
order: [1, 'asc'],
columnDefs:
[
{ searchable: false, orderable: false, targets: [0] },
{ visible: false, targets: [6] }
]
});
});
This question has an accepted answers - jump to answer
Answers
That should work. If you "View source" on this page you'll see all six columns in the HTML.
Make sure you "View source" and not "Inspect"!
Allan
Your right it does show. But I can't get the value from the hidden column. Why?
I think you would be better off using Datatables API's for this. For example:
Kevin
Thanks kthorngren! It works!