Datatable, number of entries, column visablity color etc

Datatable, number of entries, column visablity color etc

Per77Per77 Posts: 16Questions: 7Answers: 0

Hello, I have played around with the live datatable designer. I could not figure out how to do this:

1.Number of entries is not shown
2. Column visability show a blue dropdown, is it possible to change the color to the same as the button?
3. Space between Excel/Column visability button, is it possible?
4. Is it possible to change style Excel/Colum visability button?

Here is my datatable.
http://live.datatables.net/upgrade/2065/

I hope someone could help me.!

//P

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598
    1. I'm seeing the entry count at the bottom of the table. Or are you referring to something different?
    2. http://live.datatables.net/fugozoro/1/edit - this turns those drop-downs red. See the CSS tab for how to achieve that.
    3. You may be able to create different button groups and insert them in different places in the DOM perhaps. This example may help.
    4. See the example above,

    Colin

  • Per77Per77 Posts: 16Questions: 7Answers: 0

    Thanks colin!!

    Sorry for my bad explanation! This expression does not seam to work:

    Can not have button and and the lengthMenu at the same time?

    $(document).ready(function() {
    $('#example').DataTable( {
    dom: 'BIfrtip',
    buttons: ['excel', 'colvis'
    ],
    "lengthMenu": [[5, 25, 50, -1], [10, 25, 50, "All"]],
    ScrollX: true;
    } );
    } );

    Here is the demo:
    http://live.datatables.net/fugozoro/4/

    //P

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    Your dom options are wrong. You need l for length, not I for Impossible.
    https://datatables.net/reference/option/dom

  • Per77Per77 Posts: 16Questions: 7Answers: 0

    Thanks tangerine also! I changed to l, but still not working :(

    Do you have time to see what is wrong with this?
    http://live.datatables.net/fugozoro/4/edit

  • kthorngrenkthorngren Posts: 21,166Questions: 26Answers: 4,921
    Answer ✓

    You have the Javascript code in the CSS section, which isn't going to run. You also have the Javascript code at the bottom of the HTML tab. I removed the conflicting code in the HTML tab and moved the Javascript code in the CSS to the Javascript section.
    http://live.datatables.net/fugozoro/5/edit

    Kevin

  • Per77Per77 Posts: 16Questions: 7Answers: 0

    Thank you very much kthorngren/tangerine/colin!! I got itto work how I wanted it!

    /P

This discussion has been closed.