Col-visible - List of columns on popup with scroll

Col-visible - List of columns on popup with scroll

HueseniglobalHueseniglobal Posts: 27Questions: 9Answers: 0

Hello,

I have used col-visible functionality and works fine with column visibility. But i have a question that if i have more columns something like 15 to 18 then when i click on column visibility button list of columns goes so long. So is there any way where we can set its height and set scrollbar for it so it looks in good way.

This question has an accepted answers - jump to answer

Answers

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

    Hi @Hueseniglobal ,

    I'm not sure about scrolling, but you can do multi-column by setting the collectionLayout property for the collection - that may help.

    Hopefully somebody else has an answer for the scrolling,

    Cheers,

    Colin

  • HueseniglobalHueseniglobal Posts: 27Questions: 9Answers: 0

    Hello,

    I have check this from element, tried below things, let me know whether it can be used or not?

    there is one cls which is added for the popup "ul.dt-button-collection.dropdown-menu" i have just added below css on that and it comes with scrool.
    height: 216px;
    overflow-y: scroll;

    So let me know is this correct way or you can update datatable css for this.

    Kindly suggest on this.

  • HueseniglobalHueseniglobal Posts: 27Questions: 9Answers: 0

    any help on this

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

    Hi,

    div.dt-button-collection {
      max-height: 150px;
      overflow-y: auto;
    }
    

    should do the trick.

    Allan

  • HueseniglobalHueseniglobal Posts: 27Questions: 9Answers: 0

    Done thanks

This discussion has been closed.