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
  {
    @Source({DataGrid.Style.DEFAULT_CSS,"usersDataGrid.css"})
    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?

Thanks,

Patrick

--
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 google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment