elirov
14 Aug 2009, 7:25 AM
It looks like only background css styles are applied on rows in a GXT table, when using BufferView.
If you try to do this:
grid.getView().setViewConfig(new GridViewConfig() {
@Override
public String getRowStyle(ModelData model, int rowIndex, ListStore<ModelData> ds) {
return "my-foreground-row-style";
....
then the foreground colors do not take effect even though the background colors do.
I've modified the code at line 254 to:
String viewConfigRowStyle = viewConfig.getRowStyle(model, rowIndex, ds);
buf.append("<table class=\"x-grid3-row-table " + viewConfigRowStyle + "\" border=0 cellspacing=0 cellpadding=0 style=\"");
And it seems to work now. I guess the css was being applied to the DIV instead of the table, so it was being overridden at the table level.
I added the first line so that viewConfig.getRowStyle(model, rowIndex, ds) wouldn't get called more than once.
Erez
If you try to do this:
grid.getView().setViewConfig(new GridViewConfig() {
@Override
public String getRowStyle(ModelData model, int rowIndex, ListStore<ModelData> ds) {
return "my-foreground-row-style";
....
then the foreground colors do not take effect even though the background colors do.
I've modified the code at line 254 to:
String viewConfigRowStyle = viewConfig.getRowStyle(model, rowIndex, ds);
buf.append("<table class=\"x-grid3-row-table " + viewConfigRowStyle + "\" border=0 cellspacing=0 cellpadding=0 style=\"");
And it seems to work now. I guess the css was being applied to the DIV instead of the table, so it was being overridden at the table level.
I added the first line so that viewConfig.getRowStyle(model, rowIndex, ds) wouldn't get called more than once.
Erez