Is there a way to NOT repeat Column headers at the bottom of Datatable

Is there a way to NOT repeat Column headers at the bottom of Datatable

luckveryluckvery Posts: 3Questions: 0Answers: 0
edited March 2012 in General
I would like column headers to only display once at the top of the table like in this example:
http://datatables.net/blog/Creating_beautiful_and_functional_tables_with_DataTables

Most examples have them at the top and the bottom like here:
http://datatables.net/release-datatables/examples/basic_init/zero_config.html

Sorry if I may be overlooking something that has been shown else where. I looked at the docs and I am unable to get a clear understanding of how to do this.

Here is my current styling:

"sPaginationType", "full_numbers",
"sDom", "TCrti<\"clear\">pR",
"bAutoWidth", "true",
"sPageButtonActive", "fg-button,",
"bJQueryUI" ,"true"

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    Yes - just remove the TFOOT from the HTML.

    Allan
  • luckveryluckvery Posts: 3Questions: 0Answers: 0
    Thanks for the quick response however I am using dynamically created tables. Is there a way to control this through Sdom or someother attribute?
  • enggsol_dennisenggsol_dennis Posts: 11Questions: 0Answers: 0
    use javascript/css to set its style to "display:none"?

    have you tried this?

    Dennis
  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    > Is there a way to control this through Sdom or someother attribute?

    Not through sDom no, but as Dennis suggests just manipulate the DOM like you would with any plain HTML table - specifically remove the TFOOT element using jQuery / DOM methods.

    Allan
This discussion has been closed.