Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

370
Visualizações
Style AG Grid's rowGroup

I am currently using AG GRID in my project and have implemented the RowGroup functionality for one of the columns,

Here's my code: HTML

    <div id="myGrid" style="height: 400px;width:80%; display:none" class="ag-theme-alpine">
    </div>

JS:

     var gridOptions_PortCd = {
        suppressClickEdit: true,
        columnDefs: [
           { headerName: "Col1", field: "Col1", rowGroup: true, hide: true },
           
            { headerName: "Val1", field: "val2", minWidth: 200 },
            
        ],
        defaultColDef: {
            sortable: true,
            filter: true,
            resizable: true,
        },
        autoGroupColumnDef: {
            headerName: 'ColA',
            minWidth: 200,
        },
        groupDisplayType: 'singleColumn',
        animateRows: true,
    };

I'm able to feed the grid some JSON data, and all looks great (I'm not including the rest of the code as I do not think it is relevant to the question).

Now what's happening is, the Grid looks totally great, however I want to be able to style to rowGroup row in my grid because it is dark and I'd want it to just to be plain white.

here's what mine looks like:

mygrid

Sorry for the link only (SO won't let me paste image).

In essence, how do I set the COLOR of the ROW GROUP to something different, I've tried things like:

.ag-theme-alpine .ag-row.ag-row-level-0 {
    background-color: #dddbdb!important;
}

but that doesn't work. I'm not sure why it shows up as navy blue rather than just plain white or grey or something, but my hopes are to change it. Any pointers?

Goal is for it to look like this (In AG GRID website example)

Example

I've looked on AG GRID website's documenation but they do not provide info as how to style it.

EDIT: I changed it like so, and now it looks like this:

 .ag-cell {
    background-color: yellow !important;
}

updated

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

If you want to chage the color of cells in RowGroup,try to use:

 .ag-cell {
        background-color: #dddbdb !important;
    }

result: enter image description here

Update:

Try to change the background color of ag-cell-wrapper:

 .ag-cell-wrapper {
            background-color: #dddbdb !important;
        }

result: enter image description here

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda