Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to word wrap the header column in Slickgrids

Tags:

css

slickgrid

I ve recently started working with slickgrids. So getting lots and lots of doubts. How can wordwrap the column headers in slickgrids

like image 931
Diya4ever Avatar asked Dec 27 '22 03:12

Diya4ever


2 Answers

I solved this by editing 2 css tags:

In slick-default-theme.css:

.slick-header-columns {
    white-space: pre !important;
    height: 45px;
}

The height here is adjustable to your needs. This was good to display 3 lines.

In slick.grid.css, change the height settings on the below tag to 100%:

.slick-header-column.ui-state-default {
    ...
    height: 100%;
    ...
}

Hope this helps!

like image 177
ganeshk Avatar answered Jan 17 '23 06:01

ganeshk


fwiw, the author of slick grid answers this question here: https://github.com/mleibman/SlickGrid/issues/61

like image 39
Tomato Avatar answered Jan 17 '23 05:01

Tomato