Dash AG Grid - set height of pinned rows section (top, bottom)

Hey!

Recently, I’ve had a problem where i used dashGridOptions parameter called pinnedTopRowData which pins rows to the top of the grid. The problem occured with large sets of pinned rows, because the min-height of the floating top was set to match the height of all the rows inside that floating top (like ‘height’:‘auto’) and i couldn’t see the rest of the grid.

I figured a workaround by setting css like this:

.ag-floating-top {
    min-height: 250px !important;
    overflow-y: hidden !important;
}

.ag-floating-top-viewport {
    min-height: 250px !important;
    overflow-y: scroll !important;
}

This will set the height of the floating top to 250px and add a scroll.

I am making this post as a show-and-tell because I coulnd’t find the answer to my exact problem anywhere and as a question because i was wondering if there is another more elegant way of doing this? Thanks in advance!

1 Like

Hello @dashamateur,

You might be able to use the getRowHeight function as well.

1 Like