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

前端 未结 9 1218
长情又很酷
长情又很酷 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 00:48

    If you want to align your text right, left or center in ag-grid. Then use this:-

    cellStyle: { textAlign: 'right' }
    cellStyle: { textAlign: 'left' } 
    cellStyle: { textAlign: 'center' }
    

提交回复
热议问题