Hello,
I am using SmartClient Version: v8.3p_2013-03-10/Enterprise Deployment (built 2013-03-10) and getting problem on using ListGrid with Hilite.
I used Hilite to save background of each cell when user export ListGrid data to excel and here goes sample code.
As you can check a attached file, the background color is different between ListGrid and Excel file.
Please, let me know how I can solve it.
I am using SmartClient Version: v8.3p_2013-03-10/Enterprise Deployment (built 2013-03-10) and getting problem on using ListGrid with Hilite.
I used Hilite to save background of each cell when user export ListGrid data to excel and here goes sample code.
Code:
public static Hilite[] hilites = new Hilite[] { new Hilite() { { setFieldNames("utilization"); setCriteria(new AdvancedCriteria(OperatorId.AND, new Criterion[] { new Criterion("platform", OperatorId.NOT_EQUAL, "Owned CIMitar"), new Criterion("platform", OperatorId.NOT_EQUAL, "Consigned CIMitar"), new Criterion("platform", OperatorId.NOT_CONTAINS, "TOTAL") })); setTextColor("#000000"); setBackgroundColor("#aaeb82"); setId("0"); } }, new Hilite() { { setFieldNames("exDown"); setCriteria(new Criterion("exDown", OperatorId.GREATER_THAN, 3)); setTextColor("#000000"); setBackgroundColor("#ffc0cb"); setId("3"); } }, new Hilite() { { setFieldNames("diffFt"); setCriteria(new Criterion("diffFt", OperatorId.GREATER_THAN, 3)); setTextColor("#000000"); setBackgroundColor("#ffc0cb"); setId("4"); } } }; . . . . listGrid = new ListGrid(); . . . listGrid.setHilites(hilites); . . . . ImgButton biSave = new ImgButton(); biSave.setSize(24); biSave.setShowRollOver(false); biSave.setActionType(SelectionType.BUTTON); biSave.setSrc(Constants.IMAGE_EXCEL_24); biSave.setTooltip("Save as excel"); biSave.setShowDown(false); biSave.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { DSRequest dsRequestProperties = new DSRequest(); dsRequestProperties.setOperationId("customExport"); dsRequestProperties.setExportAs(ExportFormat.OOXML); dsRequestProperties.setExportDisplay(ExportDisplay.DOWNLOAD); dsRequestProperties.setExportFilename(labelTitle.getContents()); dsRequestProperties.setExportDatesAsFormattedString(true); listGrid.exportClientData(dsRequestProperties); } });
Please, let me know how I can solve it.
Comment