PDA

View Full Version : Grid, the first column is "compressed"



treblereel
27 Feb 2012, 12:35 AM
Hi all. I have strange problem. My grid is in a TabItem, and if i am refreshing grid's store while that tab is not active, first column in this grid shows like "compresed". How do i can fix it ?32159


List configs = new ArrayList();
ColumnConfig userConfig = new ColumnConfig("name", "User", 150);
userConfig.setFixed(true);
userConfig.setSortable(false);
userConfig.setMenuDisabled(true);
configs.add(userConfig);
ColumnConfig sumConfig = new ColumnConfig("sum", "∑", 50);
sumConfig.setFixed(true);
sumConfig.setSortable(false);
sumConfig.setMenuDisabled(true);
configs.add(sumConfig);
ColumnConfig timelineConfig = new ColumnConfig("timeline", "Timeline", 50);
timelineConfig.setFixed(true);
timelineConfig.setSortable(false);
timelineConfig.setMenuDisabled(true);
configs.add(timelineConfig);
ColumnConfig overtimelineConfig = new ColumnConfig("overtimeline", "Over Timeline", 70);
overtimelineConfig.setFixed(true);
overtimelineConfig.setSortable(false); overtimelineConfig.setMenuDisabled(true);
configs.add(overtimelineConfig);
ColumnConfig internalrateConfig = new ColumnConfig("internalrate", "in cost", 70);
internalrateConfig.setFixed(true);
internalrateConfig.setSortable(false);
internalrateConfig.setMenuDisabled(true);
configs.add(internalrateConfig);
ColumnConfig internalrateSumConfig = new ColumnConfig("internalrateSum", "in cost ∑ ", 70);
internalrateSumConfig.setFixed(true);
internalrateSumConfig.setSortable(false); internalrateSumConfig.setMenuDisabled(true);
configs.add(internalrateSumConfig);
ColumnConfig externalRateConfig = new ColumnConfig("externalrate", "ext cost", 70);
externalRateConfig.setFixed(true);
externalRateConfig.setSortable(false);
externalRateConfig.setMenuDisabled(true);
configs.add(externalRateConfig);
ColumnConfig externalRateSumConfig = new ColumnConfig("externalRateSum", "ext cost ∑", 70);
externalRateSumConfig.setFixed(true);
externalRateSumConfig.setSortable(false);
externalRateSumConfig.setMenuDisabled(true);
configs.add(externalRateSumConfig);
ColumnModel cm = new ColumnModel(configs); userAssignmentGrid = new Grid(new ListStore(), cm);
userAssignmentGrid.setLoadMask(true);
userAssignmentGrid.setWidth(724);
userAssignmentGrid.setHeight(350);
userAssignmentGrid.addStyleName(".my-table-style");
userAssignmentGrid.setBorders(true);
userAssignmentGrid.setAutoExpandColumn("name");
userAssignmentGrid.getView().setEmptyText("No users assigned");
userAssignmentGrid.setId("userAssignmentCheckGridId");
userAssignmentGrid.getSelectionModel().addListener(Events.SelectionChange, new Listener() { public void handleEvent(SelectionChangedEvent be) { if (be.getSelection().size() > 0) { userId = Integer.parseInt(userAssignmentGrid.getSelectionModel().getSelectedItem().get("id").toString()); loadUserAssignmentDetail(); } else { userAssignmentDetailsContentPanel.clear(); } } });

Ersmarker
27 Feb 2012, 6:48 AM
Try setting HideMode.OFFSETS on the TabItem containing the Grid.


tab.setHideMode(HideMode.OFFSETS);

treblereel
27 Feb 2012, 2:46 PM
Wow Thanks !