How to make the index column visible and invisible in datatables.
How to make the index column visible and invisible in datatables.
tinmichael
Posts: 4Questions: 0Answers: 0
We can initialize the datatables to show the index column as shown in this link. http://www.datatables.net/release-datatables/extras/FixedColumns/index_column.html. However, since I have initialize the datatable as the common default settings, later I have to hide the index column for different table initialization by using the default setting, tried to hide the index column as below, but failed.
"aoColumnDefs": [
{ "bVisible": false, "sClass": "index", "aTargets": [ 0 ] }
],
Even though I initialized the different table using the default setting but not to include the index column by hiding the first column, i can still see the numbers on the first column. Any idea for how to do to achieve this is much appreciated. If my question is not clear because of my poor command in English, please feel free to reply me.
Thanks a gain, Cheers!
"aoColumnDefs": [
{ "bVisible": false, "sClass": "index", "aTargets": [ 0 ] }
],
Even though I initialized the different table using the default setting but not to include the index column by hiding the first column, i can still see the numbers on the first column. Any idea for how to do to achieve this is much appreciated. If my question is not clear because of my poor command in English, please feel free to reply me.
Thanks a gain, Cheers!
This discussion has been closed.
Replies
Another option is to reinitialise the table and not include FixedColumns on the re-initialised table.
Allan