Wednesday, July 30, 2014

Styling DataGrid headers

I've configured my DataGrid with a custom CSS file like so:

  public interface UsersDataGridResources extends DataGrid.Resources
    DataGrid.Style dataGrid();

  private static final int DEFAULT_PAGE_SIZE = 50;
  private static final UsersDataGridResources usersDataGridResources
    = GWT.create(UsersDataGridResources.class);
  static { usersDataGridResources.dataGrid().ensureInjected(); }

  private DataGrid<User> usersGrid_
    = new DataGrid<User>(DEFAULT_PAGE_SIZE,usersDataGridResources);

I've specified a normal font in usersDataGrid.css:

.dataGridHeader {
  font-weight: normal !important;
  text-decoration: none !important;

This isn't being reflected in what I see when the grid is rendered.  I'm specifying the column headers as simple strings, not Cells.  Is there a different property I need to configure?



You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment