Package com.gwtext.client.widgets.grid

Examples of com.gwtext.client.widgets.grid.ColumnModel


        ArrayReader reader = new ArrayReader( recordDef );
        Store store = new Store( proxy,
                                 reader );
        store.load();

        ColumnModel cm = new ColumnModel( new ColumnConfig[]{new ColumnConfig() {
            {
                setHidden( true );
                setDataIndex( "uuid" ); //NON-NLS
            }
        }, new ColumnConfig() {
View Full Code Here


        valueCol.setEditor( new GridEditor( new TextField() ) );
        valueCol.setFixed( false );

        ColumnConfig[] columnConfigs = {keyCol, valueCol};

        ColumnModel columnModel = new ColumnModel( columnConfigs );
        columnModel.setDefaultSortable( true );

        final EditorGridPanel grid = new EditorGridPanel();

        Toolbar toolbar = new Toolbar();
        ToolbarButton add = new ToolbarButton( constants.Add(),
View Full Code Here

     */
    public static void registerTableConfig(TableConfig tableConfig, String tableConfigKey) {
        if ( columnConfigs.containsKey( tableConfigKey ) ) {
            return;
        }
        ColumnModel cm = createColumnModel( tableConfig );
        columnConfigs.put( tableConfigKey, cm );
        RecordDef rd = createRecordDef( tableConfig );
        recordDefs.put( tableConfigKey, rd );
        rowsPerPage.put( tableConfigKey, new Integer( tableConfig.rowsPerPage ) );
    }
View Full Code Here

                    }
                }
            };
        }

        return new ColumnModel( cfgs );
    }
View Full Code Here

        if ( !columnConfigs.containsKey( tableConfig ) ) {
            RepositoryServiceFactory.getService().loadTableConfig( tableConfig,
                                                                   new GenericCallback() {
                                                                       public void onSuccess(Object data) {
                                                                           TableConfig conf = (TableConfig) data;
                                                                           ColumnModel cm = createColumnModel( conf );
                                                                           columnConfigs.put( tableConfig,
                                                                                              cm );
                                                                           RecordDef rd = createRecordDef( conf );
                                                                           recordDefs.put( tableConfig,
                                                                                           rd );
View Full Code Here

                    }
                }
            };
        }

        return new ColumnModel( cfgs );
    }
View Full Code Here

    final RecordDef recordDef = new RecordDef(fds);
        ArrayReader reader = new ArrayReader(recordDef);
        MemoryProxy proxy = new MemoryProxy( dt.data );


        ColumnModel cm = new ColumnModel(cols);
        store = new GroupingStore();
        store.setReader(reader);
        store.setDataProxy(proxy);
        store.setSortInfo(new SortState("num", SortDir.ASC)); //NON-NLS
        if (this.dt.groupField != null) {
          store.setGroupField(dt.groupField);
        }

        store.load();


        final GridPanel grid = new GridPanel(store, cm);
        grid.setStripeRows(true);

        GroupingView gv = new GroupingView();

        //to stretch it out
        gv.setForceFit(true);
        gv.setGroupTextTpl("{text} ({[values.rs.length]} {[values.rs.length > 1 ? \"" //NON-NLS
                + constants.Items() +"\" : \"" + constants.Item() + "\"]})");


        grid.setView(gv);


        grid.setStore(store);

        int width = 900;
        if (cm.getColumnCount() > 10) {
          width = 900 + (90 * (cm.getColumnCount() - 10));
        }
        grid.setWidth(width);
        grid.setHeight(500);


View Full Code Here

    ArrayReader reader = new ArrayReader(recordDef);
    Store store = new Store(proxy, reader);
    store.load();


    ColumnModel cm  = new ColumnModel(new ColumnConfig[] {
      new ColumnConfig() {
        {
          setHidden(true);
          setDataIndex("uuid"); //NON-NLS
        }
View Full Code Here

        store.setDataProxy(proxy);
    store.setGroupField("isAdmin"); //NON-NLS
    store.setSortInfo(new SortState("userName", SortDir.ASC)); //NON-NLS
    store.load();

    ColumnModel cm  = new ColumnModel(new ColumnConfig[] {
        new ColumnConfig() {
          {
            setDataIndex("userName");                           //NON-NLS
            setSortable(true);
            setHeader(constants.UserName1());
View Full Code Here

    ArrayReader reader = new ArrayReader(recordDef);
    Store store = new Store(proxy, reader);
    store.setDefaultSort("timestamp", SortDir.DESC);
    store.load();

    ColumnModel cm = new ColumnModel(new ColumnConfig[] {
        new ColumnConfig() {
          {
            setDataIndex("severity")//NON-NLS
            setSortable(true);
            setRenderer(new Renderer() {
View Full Code Here

TOP

Related Classes of com.gwtext.client.widgets.grid.ColumnModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.