What I’m trying to do:
I want to style one specific data grid header on one specific data grid.
What I’ve tried and what’s not working:
Tried using css in the theme.css to target a data grid id and column id, but seems that the data grid id sometimes changes when I switch pages (anvil extras routing) or refresh the page.
For example, the data grid id is usually “0” but sometimes switches to “1” when I switch to a different page and come back to the original page.
Before:
After:
Code Sample:
div[data-grid-col-id="OJLQEN"][data-grid-id="0"] .anvil-component {
text-align: center !important; /* Center align the text */
}
Clone link:
share a copy of your app