Is it possible to hide the first row ( the column definitions) in ag-grid? I just want to display the data in the table and excluding the column headings.
Set the header height to zero.
Pivot Mode Off: When pivot mode is off, selecting a column toggles the visibility of the column. A selected column is visible and an unselected column is hidden. With allowDragFromColumnsToolPanel=true you can drag a column from the tool panel onto the grid it will become visible.
Showing the Column Menu To not show the menu at all, set this property to an empty array [] . In addition, you can set the attribute suppressMenu=true to the column definition to not show the menu for a particular column. The order of the menu tabs shown in the menu will match the order you specify in this array.
In version 28 of AG Grid we added support for wrapping header cell text. This is done with the Wrap Header Text and Auto Header Height properties. Adding wrapHeaderText: true will cause long headers to wrap, but if some are longer than the actual height of the header then they will be shown truncated.
You can add headerHeight
property on your component and set this to 0 which will hide the headers. Like so:
<ag-grid-angular [gridOptions]="gridOptions"
[headerHeight]="0">
</ag-grid-angular>
Take a look at this StackBlitz.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With