Hello,
I have extended a ListGrid and I have added a ToolStript at the end of the table:
Now, I want a print preview for this table without the ToolStrip. I have read the documentation and I am trying to omit ToolStrip from print preview but it is ignored:
Any idea?
Thank you in advance!
I have extended a ListGrid and I have added a ToolStript at the end of the table:
Code:
public class AppGrid extends ListGrid{
// Constructor
public AppGrid(){
// Creating toolstrip
ToolStrip tool = new ToolStrip ();
// Adding some buttons in toolstrip: print preview, export, etc..
[...]
//Adding toolstrip in ListGrid
setGridComponents(new Object[] {ListGridComponent.HEADER, ListGridComponent.FILTER_EDITOR, ListGridComponent.BODY,tool });
}
Code:
public void onClick(ClickEvent event) {
if (grid != null) {
PrintProperties printProp = new PrintProperties();
String[] myommited = new String[1];
myommited[0] = "ToolStrip";
printProp.setOmitControls(myommited);
Canvas.showPrintPreview(new Object[] { grid },printProp,"Print preview", null);
}
}
Thank you in advance!