1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    3
    Vote Rating
    0
    mindler is on a distinguished road

      0  

    Default Unanswered: Problem with columns

    Unanswered: Problem with columns


    Hi,

    I have a problem with columns in grid. In this grid there are 31 + 3 column with fix widths. And if I zoom out the view than I find that the columns in the grid-rows will be smaller than in the header. If I zoom out one more and more a difference will be 2 columns!

    Does anybody know this problem? And the solution?

  2. #2
    Sencha - Community Support Team mankz's Avatar
    Join Date
    Nov 2007
    Location
    Stockholm, Sweden
    Posts
    2,747
    Answers
    33
    Vote Rating
    106
    mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all

      0  

    Default


    Likely a known grid bug, but post your code in a runnable test case along with Ext JS version and browser version.

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Posts
    3
    Vote Rating
    0
    mindler is on a distinguished road

      0  

    Default


    Well, "runable" will be hard because of this part of my code is a part of a big project...

    But here is the problematic code: --------------------------------------------

    public HaviNyilvantartasTabPanel(String name, BindingManager bindingMgr, Enum tabEnumConstant) {
    super(name);
    this.enabled = AuthClient.getInstance().isIntezmeny();
    this.buttonEnabled = false;
    this.bindingManager = bindingMgr;
    this.honap = 6;
    this.ev = 2010;
    this.setWidth("100%");

    final ContentPanel wrapperPanel = new ContentPanel();
    wrapperPanel.setButtonAlign(HorizontalAlignment.LEFT);
    wrapperPanel.setHeaderVisible(false);
    wrapperPanel.setBorders(false);
    wrapperPanel.setWidth("100%");
    wrapperPanel.setHeight("15px");

    List<ColumnConfig> configs = new ArrayList<ColumnConfig>();

    ColumnConfig column = new ColumnConfig(1, "nev", 120);
    column.setMenuDisabled(true);
    configs.add(column);

    CheckColumnConfig checkColumn = null;

    DateWrapper dateWrapper = new DateWrapper(this.ev, honap, 1);

    int maxDateOfmonth = dateWrapper.getLastDateOfMonth().getDate();
    if (maxDateOfmonth == 28) {
    maxDateOfmonth = 29;
    }

    for (int d = 0; d < maxDateOfmonth; ++d) {
    checkColumn = new CheckColumnConfig(d + 1,
    ((Integer) (d + 1)).toString(), 23);
    CheckBox cb = new CheckBox();
    cb.setReadOnly(!this.enabled);
    CellEditor checkBoxEditor = new CellEditor(cb);
    checkColumn.setEditor(checkBoxEditor);
    checkColumn.setSortable(false);
    checkColumn.setMenuDisabled(true);
    checkColumn.setAlignment(HorizontalAlignment.CENTER);
    configs.add(checkColumn);
    }

    ColumnModel cm = new ColumnModel(configs);
    this.bindingManager.getStore().setMonitorChanges(true);
    this.bindingManager.getStore().setFiresEvents(true);
    this.grid = new EditorGrid<BeanModel>(this.bindingManager.getStore(), cm);
    this.grid.getView().setEmptyText("Nincsenek megjeleníthető jogosítók");
    this.grid.setColumnLines(true);
    this.grid.setBorders(false);

    if (this.enabled) {
    this.grid.addListener(Events.OnClick, this.columnHeaderListener);
    this.grid.addListener(Events.BeforeEdit, new JogviszonyHatalyListener());
    });
    } else {
    for (ColumnConfig col : configs) {
    col.setStyle(Constants.BACKGROUND + ":" + Constants.ACCESSDENIED_STLYE + ";");
    }
    }
    this.toolBar = new PagingToolBar(AbstractNapiNyilvantartasokBasePage.getGridPageSize());
    PagingLoader<PagingLoadResult<?>> loader = (PagingLoader) this.bindingManager.getPagingLoader();
    loader.setRemoteSort(true);
    this.bindingManager.enableModificationCheckBeforeLoad();
    this.toolBar.bind(loader);

    this.toolBar.disableEvents(true);
    ContentPanel mainPanel = new ContentPanel(new BorderLayout());
    mainPanel.add(wrapperPanel, new BorderLayoutData(LayoutRegion.NORTH, 38));
    mainPanel.add(this.grid, new BorderLayoutData(LayoutRegion.CENTER));
    mainPanel.add(this.toolBar, new BorderLayoutData(LayoutRegion.SOUTH, 27));
    mainPanel.setHeaderVisible(false);
    this.add(mainPanel);
    }
    //---------------------------------------------------------



  4. #4
    Sencha - Community Support Team mankz's Avatar
    Join Date
    Nov 2007
    Location
    Stockholm, Sweden
    Posts
    2,747
    Answers
    33
    Vote Rating
    106
    mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all

      0  

    Default


    Is this GXT code? Then you should post in the Ext GWT forum http://www.sencha.com/forum/forumdis...88-Gxt-Q-amp-A

  5. #5
    Sencha User
    Join Date
    Sep 2011
    Posts
    3
    Vote Rating
    0
    mindler is on a distinguished road

      0  

    Default


    @mankz: Thank you for the moving.

Thread Participants: 1

Tags for this Thread