Change column heading
Change column heading
NMcCloud
Posts: 15Questions: 7Answers: 0
How can you change a column heading without removing the sorting icon. Also, I cannot show previously hidden columns using the visible method. It just gives back an error saying it cannot find the style parameter, presumably because the column is currently not there.
Thanks in advance.
This discussion has been closed.
Answers
Found the error, or at least one of the culprits. If the table has scrollY/scrollX defined, it prevents the columns from being hidden then shown again. It appears the visibleColumns array is being increased before the headerCells array is, which is causing the error.
http://jsbin.com/winonatupi/1/edit
Still would like to know if its easy to change the header text without removing the scroll icons; however, the more pressing issue of the visibility error was found. See: https://www.datatables.net/forums/discussion/28074/using-scrolly-x-prevents-hiding-showing-columns#latest