Cannot get table to work with less than 4 columns

Cannot get table to work with less than 4 columns

djendjen Posts: 2Questions: 0Answers: 0

Apologies if i'm missing something obvious here.

I'm using the table from this example and it works brilliantly for a large table with many headings, but if i create a table with only 3 headings i just cannot get it to work.

Can anyone point me in the right direction please?

Many thanks,
Dave

Replies

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @djen ,

    Yep, sorry, obvious :)

    You're initialising your table with this:

    $(document).ready(function() {
        $('#example').DataTable( {
            "order": [[ 3, "desc" ]]
        } );
    } );
    

    on a three-column table... JS numbering starts from 0

    Cheers,

    Colin

  • djendjen Posts: 2Questions: 0Answers: 0

    Hi @colin

    Thank you for your response

    If only you could have heard what I was calling myseef.

    More caffiene needed I think.

    Again, Thank you,
    Dave

This discussion has been closed.