开发者

How center text of the column headers in SlickGrid?

开发者 https://www.devze.com 2023-03-12 05:32 出处:网络
there any way to center text in a column header Any ideas how to do thi开发者_C百科s or whatccsmust be changed ?Add the following style in your css:

there any way to center text in a column header Any ideas how to do thi开发者_C百科s or what ccs must be changed ?


Add the following style in your css:

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


If you don't want all column headers to be aligned the same way, you can also define individual css classes via the headerCssClass attribute of a column definition, like:

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;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号