在 ag-grid 中隐藏列名?

san*_*rao 6 ag-grid angular

是否可以隐藏 ag-grid 中的第一行(列定义)?我只想显示表中的数据并排除列标题。

Viq*_*qas 9

您可以headerHeight在组件上添加属性并将其设置为 0,这将隐藏标题。像这样:

<ag-grid-angular [gridOptions]="gridOptions"
    [headerHeight]="0">
 </ag-grid-angular>
Run Code Online (Sandbox Code Playgroud)

看看这个StackBlitz。

  • 通过这个解决方案,我可以隐藏标题。但如何删除标题和第一行之间的分隔线? (2认同)