FixHeader problem

FixHeader problem

sebastian.casabonnesebastian.casabonne Posts: 4Questions: 1Answers: 0

Hi, i have a issue with the FixHeader on my tables, the thing is, it doesn´t disappear when i load another table and its looks like this:

It keep the fixheader of other loaded tables previously :(
This happens when i load a table in a section of my menu and then i go to another section and load other table.

Answers

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    It sounds like you have multiple tables on the page, but they are individually being shown and hidden inside various containers - a bit like tabs. Is that correct?

    If so, we need to tell DataTables when to enable or disable FixedHeader for the tables that are now shown and hidden.

    That can be done using the following code:

    $.fn.dataTable
        .tables( { api: true } )
        .fixedHeader.disable();
    
    $.fn.dataTable
        .tables( { visible: true, api: true } )
        .fixedHeader.enable();
    

    Execute that any time you show / hide tables, and it should correctly update the FixedHeader visibility state.

    Regards,
    Allan

  • sebastian.casabonnesebastian.casabonne Posts: 4Questions: 1Answers: 0

    Hum.. that's not the problem i have, i actually have many section in my general page (menu sections), i don't have 2 or more tables in one page (actually yes, but that is not the case)

    The thing is the FixHeader of a table doesn't disappears when its created, when i create a datatable at the begining, there should be a way to find every fixHeaders and disable them or destroy them.

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    Could you give me a link to the page show I can take a look at and fully understand the problem please? You can seen me a PM with the address if you don't want to make it public.

    Regards,
    Allan

  • sebastian.casabonnesebastian.casabonne Posts: 4Questions: 1Answers: 0

    why my answer doesn't appear here? its said something like ... we're going to verify your comment or something like that :/

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    I'm afraid I don't see your comment in the spam filter (which is what that message means). Could you possibly post it again? I've marked your account to by-pass the automated spam filter.

    Allan

  • sebastian.casabonnesebastian.casabonne Posts: 4Questions: 1Answers: 0

    The thing is, i can't give you access to the system because is a government system, but i can show you the code of how we create and use the datatables.

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    Yes that would be useful - if you want to, send me a PM by clicking my name above and then the "Send message" button.

    Thanks,
    Allan

This discussion has been closed.