Just like with any ClientBundle and CssResource : create an interface that extends Datagrid.Resources and overrides the dataGridStyle method with the @Source annotation pointing to your own CSS file (or, possibly, to the source file and your own file, therefore they will be combined together).
Doing this will override the style for all DataGrid in your application (actually it depends on which instance of CssResource gets ensureInjected() ): one from the original Datagrid.Resources or one from your sub-interface): since you use one and the same type of return value ( DataGrid.Style ), the names of entangled classes will be the same.
If you want to change the style in each case, then also declare an interface that extends DataGrid.Style , and use this as the return type for your overriding dataGridStyle : because the obfuscated class name is based on both the full name of the interface and by the method name, your sub-interface of DataGrid.Style will generate different names of tangled classes than the original interface of DataGrid.Style .
Then, of course, GWT.create() your sub-interface of Datagrid.Resources and pass it as an argument to the DataGrid constructor.
See also http://code.google.com/p/google-web-toolkit/issues/detail?id=6144
source share