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

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar