I am changing the background color of the rows in my ListGrid using the following code:
private final ListGrid locationsLG = new ListGrid() {
@Override
protected String getBaseStyle(ListGridRecord record, int rowNum, int colNum) {
if ((rowNum % 2) != 0) {
return "x-grid3-row";
} else {
return "x-grid3-row-alt";
}
}
};
css:
.x-grid3-row {
background-color:#ffffff;
}
.x-grid3-row-alt {
background-color:#FFFF00;
}
and the code works very well. I got the desired result. The real problem is when I am printing the ListGrid using the following code:
this.view.getPrintIB().addClickHandler(new ClickHandler() {
public void onClick(ClickEvent clickEvent) {
Canvas.showPrintPreview(view.getLocationsLG());
}
});
The styles are not showing up. Basically I am getting black and white picture.
Any help/suggestions/direction will be greatly appreciated.
Thank you so much !
private final ListGrid locationsLG = new ListGrid() {
@Override
protected String getBaseStyle(ListGridRecord record, int rowNum, int colNum) {
if ((rowNum % 2) != 0) {
return "x-grid3-row";
} else {
return "x-grid3-row-alt";
}
}
};
css:
.x-grid3-row {
background-color:#ffffff;
}
.x-grid3-row-alt {
background-color:#FFFF00;
}
and the code works very well. I got the desired result. The real problem is when I am printing the ListGrid using the following code:
this.view.getPrintIB().addClickHandler(new ClickHandler() {
public void onClick(ClickEvent clickEvent) {
Canvas.showPrintPreview(view.getLocationsLG());
}
});
The styles are not showing up. Basically I am getting black and white picture.
Any help/suggestions/direction will be greatly appreciated.
Thank you so much !