want to hide below highlighted column and apply sorting to first header row.
want to hide below highlighted column and apply sorting to first header row.
smruti20
Posts: 12Questions: 4Answers: 0
in DataTables
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Not sure how you are creating the search inputs but you can loop through the columns that won't have search inputs and set the html to an empty string. Use
orderCellsTop
to move the sorting function to the top header row. If you still need help please provide a link to your page or a test case showing how you are creating the header rows so we can help debug.https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
http://live.datatables.net/guleyovo/1/edit this my code
Your test case wasn't running due to errors. You were referencing a non-existent column in
columnDefs
and not loading the buttons JS code. I commented out the code not needed for the example:http://live.datatables.net/mepedufu/1/edit
I added
orderCellsTop
. The selector needed changed to apply the select lists to the second header and added a loop to empty the cells not containing the select input.Kevin
Thanks @kthorngren your solution work for me