Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide Column Names in ag-grid?

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.

like image 857
sanjeev u rao Avatar asked Dec 20 '19 10:12

sanjeev u rao


People also ask

How do I hide the header name on Ag grid?

Set the header height to zero.

How do you hide and show columns in Ag grid?

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.

How do I hide the column menu in Ag grid?

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.

How do you wrap header text in Ag grid?

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.


1 Answers

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.

like image 101
ViqMontana Avatar answered Sep 28 '22 03:09

ViqMontana