I’m using an Ag grid in a react js project which has a large number of rows. On the page there is other content as well. I’m using ‘autoheight’ to hide the grid scrollbars and use the window ones instead. As I scroll down I need to have the headers flowing down as well.

Here’s what I’ve tried so far.
myGrid is the id of the div wrapping the AgGridReact. With below code the header floats but hides 2 rows.

#myGrid .ag-header {
    position: fixed !important;
    z-index: 1;
}    
#myGrid .ag-body {
    top: 100px;
}

New contributor

amy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.