Disable Header?

Disable Header?

rmeltgrmeltg Posts: 1Questions: 0Answers: 0
edited October 2009 in General
Is there any way to disable the header of the table ( the section with the "search box" & "rows/page" )

Replies

  • allanallan Posts: 63,700Questions: 1Answers: 10,501 Site admin
    Hi rmeltg,

    Yes indeed. Two options:

    1. Disable those features: http://datatables.net/usage/features
    2. Remove (or reposition) the elements using the sDom parameter: http://datatables.net/usage/options#sDom

    Regards,
    Allan
  • themitchythemitchy Posts: 8Questions: 0Answers: 0
    edited February 2010
    I'm looking to do something similar but even with the features disabled or moved that div still takes up space.

    I'd like to be able to css it out of existence but it shares all the same styling classes as the footer - which I want to keep.

    Any advice?
  • themitchythemitchy Posts: 8Questions: 0Answers: 0
    This was easier than I first thought. I made the empty header go away by setting fg-toolbar padding to 0. I then fixed up the look of the footer by adding margin: 5 to the components I had there.

    Seems a bit hacky, but it did work:

    [code]
    .fg-toolbar {
    padding: 0;
    }

    .dataTables_info {
    float: left;
    margin: 5px;
    width: 30%;
    }

    .dataTables_paginate {
    float: right;
    margin: 5px;
    text-align: right;
    }
    [/code]
This discussion has been closed.