Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the color of selected row in ag grid? [duplicate]

I need to change the selection color from blue(default color) to red bordered blue color in ag-grid.enter image description here

Refer the pic the blue color should be converted to thick blue with red border

like image 588
Joseph Nannepaga Avatar asked Mar 08 '19 10:03

Joseph Nannepaga


People also ask

How do I change the selected row color in Ag grid?

Row Selections When row selection is enabled, you can set the color of selected rows using --ag-selected-row-background-color . If your grid uses alternating row colours we recommend setting this to a semi-transparent colour so that the alternating row colours are visible below it.

How do you highlight a row in Ag grid?

The class ag-row-hover and ag-column-hover are added to cells as the mouse is dragged over the cells row or column. The example below demonstrates the following: CSS class ag-row-hover has background color added to it, so when you hover over a cell, the row will be highlighted.

How do you style rows in Ag grid?

You can add CSS styles to each row in the following ways: rowStyle : Property to set style for all rows. Set to an object of key (style names) and values (style values). getRowStyle : Callback to set style for each row individually.


1 Answers

Add the following to your css

.ag-theme-balham .ag-row-selected {
    background-color: #4abbff;
}

.ag-theme-balham .ag-ltr .ag-cell-focus {
    border: 1px solid red;
}
like image 198
Ghonima Avatar answered Dec 09 '22 13:12

Ghonima