0

How can I change the background color of a grid cell on mouse over in GXT (Java)?

I want to change the background color of a grid cell when the mouse is over the cell, from the code, not from the CSS. Is there a way to do that?

Andrei Mihuț
  • 47
  • 1
  • 8

1 Answers1

0

Try this:

 grid.addStyleOnOver(grid.getElement(), styleClass);

You can get style from *.gss file or create your own style by

StyleInjector.inject(".myStyle {background-color: yellow;}");
grid.addStyleOnOver(grid.getElement(), "myStyle");