How is the center text of a column header in a SlickGrid?

is there any way to center the text in the column header Any ideas how to do this or which ccs should be changed?

+4
source share
2 answers

Add the following style to your css:

.slick-header-column { text-align: center; } 
+9
source

If you do not want all the column headers to be aligned the same way, you can also define individual css classes using the headerCssClass attribute of the column definition , for example:

 var columns = [ {id: "title", name: "Title", field: "title", headerCssClass: 'text'}, {id: "price", name: "Price", field: "price", headerCssClass: 'currency'} ]; 

and

 .slick-header-column.currency { text-align: center; } 
+2
source

All Articles