With SmartGWT 3.1 2012-12-20 ListGridField#setHeaderBaseStyle does not remove the standard header background in IE9. A known issue?
removes the background (image) in FF but not in IE9 (see listgrid-header-base-style.png).
Here's a standalone code sample that tries to resemble my actual case:
Code:
field.setHeaderBaseStyle("someNonExistentStyle");
Here's a standalone code sample that tries to resemble my actual case:
Code:
public class SmartGwt implements EntryPoint { public void onModuleLoad() { ListGrid listGrid = createListGrid(); listGrid.setFields(createFields()); listGrid.addData(new Record()); HLayout canvas = new HLayout(); canvas.addMember(listGrid); canvas.draw(); } private ListGrid createListGrid() { ListGrid listGrid = new ListGrid(); listGrid.setBorder("0"); listGrid.setWidth(300); listGrid.setCanReorderFields(Boolean.FALSE); listGrid.setShowHeaderContextMenu(Boolean.FALSE); listGrid.setAutoFitWidthApproach(AutoFitWidthApproach.BOTH); listGrid.setShowRecordComponents(Boolean.TRUE); listGrid.setShowRecordComponentsByCell(Boolean.TRUE); listGrid.setAlternateRecordStyles(Boolean.FALSE); listGrid.setShowHeader(Boolean.TRUE); listGrid.setCanSort(Boolean.FALSE); listGrid.setCanResizeFields(Boolean.FALSE); listGrid.setCanEdit(Boolean.TRUE); listGrid.setHeight(48); listGrid.setAlwaysShowEditors(Boolean.TRUE); listGrid.setNeverValidate(Boolean.TRUE); listGrid.setEditByCell(Boolean.TRUE); listGrid.setAutoFitData(Autofit.VERTICAL); listGrid.setBodyOverflow(Overflow.VISIBLE); listGrid.setOverflow(Overflow.VISIBLE); listGrid.setLeaveScrollbarGap(Boolean.FALSE); listGrid.setShowAllRecords(Boolean.TRUE); listGrid.setSelectionType(SelectionStyle.NONE); listGrid.setCanTabToHeader(Boolean.FALSE); listGrid.setAnimateRemoveRecord(Boolean.FALSE); listGrid.setFastCellUpdates(Boolean.FALSE); return listGrid; } private ListGridField[] createFields() { List<ListGridField> allFields = new ArrayList<ListGridField>(); ListGridField regularField = new ListGridField("test", "Test", 200); allFields.add(regularField); allFields.add(createAddRemoveColumn()); return allFields.toArray(new ListGridField[allFields.size()]); } protected ListGridField createAddRemoveColumn() { ListGridField addRemoveField = new ListGridField("someField", " ", 24); addRemoveField.setCanEdit(Boolean.FALSE); addRemoveField.setType(ListGridFieldType.ICON); addRemoveField.setCellIcon("http://www.smartclient.com/smartgwt/showcase/images/silk/comment_edit.png"); addRemoveField.setShowHover(Boolean.TRUE); Map<String, String> icons = new HashMap<String, String>(); addRemoveField.setValueIcons(icons); addRemoveField.setHeaderButtonProperties(createAddButton()); addRemoveField.setHeaderBaseStyle("someNonExistentStyle"); return addRemoveField; } private Button createAddButton() { Button button = new Button(); button.setIcon("http://www.smartclient.com/smartgwt/showcase/images/silk/chart_bar.png"); button.setTooltip("Foo"); button.setPadding(2); button.setIconHeight(16); button.setIconWidth(16); button.setShowDown(Boolean.FALSE); button.setShowRollOver(Boolean.FALSE); return button; } }
Comment