Colvis - Show/Hide buton drop down: multiple column

Colvis - Show/Hide buton drop down: multiple column

Flo_comFlo_com Posts: 4Questions: 0Answers: 0
edited February 2014 in Plug-ins
Hi,

I have a table with more than 30 columns. I am using ColVis and just configured the button to display exactly where I wanted it but I cannot figure out how to change the way the list of columns is displayed once the button is pressed: Right now I have one long column of 30 items and I would love to have two or three columns of items so that my user doesn't have to scroll down so much... Does it make sense? Is it possible?

Replies

  • allanallan Posts: 63,602Questions: 1Answers: 10,486 Site admin
    Perfect sense - its just a case of customising the CSS.

    This is the container: https://github.com/DataTables/ColVis/blob/master/css/dataTables.colVis.css#L90

    You'd increase it's width to 450px for example. And modify the button styles if you want.

    Allan
  • Flo_comFlo_com Posts: 4Questions: 0Answers: 0
    edited February 2014
    Thanks Allan!

    I'm sure there is a better way to do this, I just hard coded the widths so that I would get two columns like so:

    ul.ColVis_collection {
    width: 330px;}

    ul.ColVis_collection li {
    width:150px;
    float: left;}
This discussion has been closed.