1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    8
    Vote Rating
    0
    planadecu is on a distinguished road

      0  

    Default Grid align problem in GXT 2.X

    Grid align problem in GXT 2.X


    Hello,

    I'm creating a grid with a variable number of columns. The first colum size is 200 and the other are 50.
    I can't get a correct grid render. The container is the whole page, so it's big enough. I want the columns give the width of the table.

    What am I doing wrong ?

    Code:
        // Grid
        ArrayList<ColumnConfig> configs = new ArrayList<ColumnConfig>();
    
    
        ColumnConfig column = new ColumnConfig();
        column.setId(BeanModelData.Field.name.name());
        column.setWidth(200);
        column.setRowHeader(false);
        column.setSortable(false);
        column.setMenuDisabled(true);
        column.setAlignment(HorizontalAlignment.RIGHT);
        configs.add(column);
    
    
        for (Period period : Period.values()) {
            column = new ColumnConfig();
            column.setId(period.name());
            column.setHeader(loc(period));
            column.setRowHeader(true);
            column.setWidth(50);
            column.setSortable(false);
            column.setMenuDisabled(true);
            column.setAlignment(HorizontalAlignment.RIGHT);
            SpinnerField spinnerField = new SpinnerField();
            spinnerField.setIncrement(10);
            spinnerField.getPropertyEditor().setType(Integer.class);
            spinnerField.getPropertyEditor().setFormat(NumberFormat.getFormat("0.0"));
    
    
            configs.add(column);
        }
    
    
        final ColumnModel cm = new ColumnModel(configs);
        final ListStore<BeanModelData> store = new ListStore<BeanModelData>();
        store.add(priceBean.getPricesByPeriod());
        final EditorGrid<BeanModelData> grid = new EditorGrid<BeanModelData>(store, cm);
        grid.getView().setForceFit(true);
        grid.setAutoHeight(true);
    
    
        container.add(grid);
    Thanks,
    ---
    Jordi P.
    www.rourevell.com
    www.reservango.com
    Last edited by planadecu; 31 May 2012 at 9:37 AM. Reason: Grid -> EditorGrid

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi