Question

I have something like the cell table here:

http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwCellTable

but without this UI binder (not really sure what thats all about, my project does not use it)

Anyways, i need a way to edit the cell row selection CSS and cant find a way. Right now when i select a row it just outlines the row, i need a way to change the cells background color and edit this default behavior.

i know i can set the css for the table by using cellTable.setStyleName("mycssFile") but how do i set it for an individual cell row? I have no individual cell reference currently, and any reference i try to put in front of cellTable does not compile.

Was it helpful?

Solution

When you construct a CellTable, it grabs the default ClientBundle implementation (See GWT ClientBundle for details), which adds the cellTableKeyboardSelectedRow CSS class name to the selected row. But ClientBundle obfuscates the class names, so it shows up as a strange alphanumeric name if you look at the source. That CSS class name is defined in CellTable.css, which is located in gwt-user.jar/com/google/gwt/user/cellview/client/CellTable.css.

If you don't like the way it looks, you can implement your own ClientBundle (or extend CellTable.Resources) and use this constructor to make your CellTable: public CellTable(int pageSize, Resources resources).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top