I ended up going with simply changing the CSS. I tried this early without 
success, but I found out what was going wrong.

The DataGrid CSS can be overridden (as described in many postings here). 
 In short, custom CSS can be provided to the DataGrid (and CellTable) via 
the constructor like this.

private DataGrid.Resources tablecss = 
GWT.create(MyResources.TableCss.class);
@UiField(provided=true) DataGrid<Info> table = new DataGrid<Info>( 10, 
tablecss );

TableCss is in the ClientBundle and looks like this.

public interface MyResources extends ClientBundle
{
...

// TableCss cell table
public interface TableCss extends DataGrid.Resources
{
@Source({DataGrid.Style.DEFAULT_CSS, 
"com/mycompany/myapp/client/resources/Table.css"})
DataGridStyle dataGridStyle();
 interface DataGridStyle extends DataGrid.Style {}
}

...
}

I've done this before (with CellTable) and it works nicely.  But this time 
I noticed something that I don't yet understand.  Previously, I've only 
overridden the CellTable styles that I wanted to change in the CSS file. 
 In this case, I had to define all the DataGrid styles, that are defined in 
the default datagrid CSS.  Doing that worked.  Overriding just a few style 
didn't work, for some reason.

Then I just altered the styles that had to do with hover and keyboard 
selection.  That gave me the effect I wanted.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/2qShUa9pU5gJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to