How to make all column headers sticky(fixed) in ag-grid in angular while page scrolling?

870 views Asked by At

I have tried this for two days but still I couldn't find the solution can any one please help me in this.

2

There are 2 answers

1
Cuong Hoang On

I suppose your header HTML be like:

the CSS for it to stick on top must be:

.header {
  position: fixed;
  width: 100vw;
  top: 0px;
  left: 0px;
}

0
Gina Habib On

you can use sticky

    .header {position: sticky;}