How can I center the text in the headers for an AG-grid control?

前端 未结 9 1186
长情又很酷
长情又很酷 2021-02-19 00:22

How can I center the text in the headers for an AG-grid control? I have tried using cellstyle and cellclass in the column definition but that did not work. Thank you

9条回答
  •  無奈伤痛
    2021-02-19 01:03

    To use a custom class, add headerClass: "text-center" to the column definition and css as follows:

    text-center * {
        justifyContent: center
    }
    

提交回复
热议问题