Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

BaseStyle of the ListGrid are not showing up at the PrintPriview

$
0
0
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 !

Viewing all articles
Browse latest Browse all 4756

Trending Articles