Results 1 to 7 of 7

Thread: GXT 3 RC Grouping Inline Editing Grid

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Apr 2007
    Posts
    1
    Vote Rating
    0
      0  

    Default GXT 3 RC Grouping Inline Editing Grid

    When creating a grouping with inline editing, the display of the textfields does not take the height of the grouping header into account, thus displaying it higher then it should.
    Attached Images Attached Images

  2. #2
    Sencha User WesleyMoy's Avatar
    Join Date
    Oct 2009
    Location
    Redwood City, California
    Posts
    402
    Vote Rating
    2
      0  

    Default

    I'm not able to replicate the exact case you're showing in your screenshot. Please post your test case implementing EntryPoint and I'll see what I can do.

  3. #3
    Sencha Premium Member
    Join Date
    Apr 2012
    Posts
    22
    Vote Rating
    0
      0  

    Default

    I'm using 3.0.1. Here is test case:

    Code:
    package test.client;
    
    import java.util.ArrayList;
    import java.util.List;
    
    
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.core.client.GWT;
    import com.google.gwt.editor.client.Editor.Path;
    import com.google.gwt.user.client.Random;
    import com.google.gwt.user.client.ui.RootPanel;
    import com.sencha.gxt.core.client.ValueProvider;
    import com.sencha.gxt.data.shared.ListStore;
    import com.sencha.gxt.data.shared.ModelKeyProvider;
    import com.sencha.gxt.data.shared.PropertyAccess;
    import com.sencha.gxt.widget.core.client.form.TextField;
    import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
    import com.sencha.gxt.widget.core.client.grid.ColumnModel;
    import com.sencha.gxt.widget.core.client.grid.Grid;
    import com.sencha.gxt.widget.core.client.grid.GroupingView;
    import com.sencha.gxt.widget.core.client.grid.editing.GridEditing;
    import com.sencha.gxt.widget.core.client.grid.editing.GridInlineEditing;
    
    
    /**
     * Entry point classes define <code>onModuleLoad()</code>.
     */
    public class GroupingGridInlineEditingBug implements EntryPoint {
        
        private int genCounter = 0;
        
        private String generateString(int nChars) {
            return generate(nChars, 26, 65);
        }
        
        private String generate(int nChars, int range, int offset) {
            StringBuilder sb = new StringBuilder();
            for (int i=0; i<nChars; i++) {
                char c = (char) (Random.nextInt(range) + offset);
                sb.append(c);
            }
            return sb.toString();
        }
        
        private void populateStore(ListStore<FuelPrice> store) {
            for (int i=0; i<10; i++)
                store.add(new FuelPrice());
        }
        
        public interface Properties extends PropertyAccess<FuelPrice> {
            @Path("col1")
            ModelKeyProvider<FuelPrice> key();
            ValueProvider<FuelPrice, String> col1();
            ValueProvider<FuelPrice, String> col2();
            ValueProvider<FuelPrice, String> col3();
        }
        
        public final Properties props = GWT.create(Properties.class);
        
        public class FuelPrice {
            private String col1;
            private String col2;
            private String col3;
            
            public FuelPrice() {
                col1 = generateString(3);
                col2 = generateString(3);
                col3 = genCounter + "";
                        
                genCounter++;
                genCounter = genCounter % 3;
            }
            
            public String getCol1() {
                return col1;
            }
            public String getCol2() {
                return col2;
            }
            
            public String getCol3() {
                return col3;
            }
        }
        
        public void onModuleLoad() {
                
            final ListStore<FuelPrice> store = new ListStore<FuelPrice>(props.key());
            populateStore(store);
            
            final ColumnConfig<FuelPrice, String> col1 = new ColumnConfig<FuelPrice, String>(props.col1(), 30, "Col1");
            final ColumnConfig<FuelPrice, String> col2 = new ColumnConfig<FuelPrice, String>(props.col2(), 30, "Col2");
            final ColumnConfig<FuelPrice, String> col3 = new ColumnConfig<FuelPrice, String>(props.col3());
            List<ColumnConfig<FuelPrice, ?>> configs = new ArrayList<ColumnConfig<FuelPrice, ?>>();
            configs.add(col1);
            configs.add(col2);
            configs.add(col3);
            ColumnModel<FuelPrice> cm = new ColumnModel<FuelPrice>(configs);
    
    
            final GroupingView<FuelPrice> view = new GroupingView<FuelPrice>();
            view.setShowGroupedColumn(false);
            view.setForceFit(true);
    
    
            final Grid<FuelPrice> grid = new Grid<FuelPrice>(store, cm);
            grid.setView(view);
        view.groupBy(col3);
    
    
        final GridEditing<FuelPrice> editing = new GridInlineEditing<FuelPrice>(grid);
        editing.addEditor(col1, new TextField());
        editing.addEditor(col2, new TextField());
    
    
        RootPanel.get().add(grid);
        }
    }

  4. #4
    Sencha Premium Member
    Join Date
    Jun 2012
    Posts
    1
    Vote Rating
    0
      0  

    Default I have the same problem it can be reproduced with the groupingGridExample.java

    release 3.0.0b and 3.0.1 suffer from the same problem.

    GroupingView GridInlineEditing

    /**
    * Sencha GXT 3.0.0b - Sencha for GWT
    * Copyright(c) 2007-2012, Sencha, Inc.
    * licensing@sencha.com
    *
    * http://www.sencha.com/products/gxt/license/
    */
    package com.sencha.gxt.explorer.client.grid;


    import java.util.ArrayList;
    import java.util.Date;
    import java.util.List;


    import com.google.gwt.cell.client.DateCell;
    import com.google.gwt.cell.client.TextCell;
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.core.client.GWT;
    import com.google.gwt.i18n.client.DateTimeFormat;
    import com.google.gwt.user.client.ui.IsWidget;
    import com.google.gwt.user.client.ui.RootPanel;
    import com.google.gwt.user.client.ui.Widget;
    import com.sencha.gxt.data.shared.ListStore;
    import com.sencha.gxt.examples.resources.client.TestData;
    import com.sencha.gxt.examples.resources.client.model.Stock;
    import com.sencha.gxt.examples.resources.client.model.StockProperties;
    import com.sencha.gxt.explorer.client.model.Example.Detail;
    import com.sencha.gxt.widget.core.client.ContentPanel;
    import com.sencha.gxt.widget.core.client.form.NumberField;
    import com.sencha.gxt.widget.core.client.form.NumberPropertyEditor;
    import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
    import com.sencha.gxt.widget.core.client.grid.ColumnModel;
    import com.sencha.gxt.widget.core.client.grid.Grid;
    import com.sencha.gxt.widget.core.client.grid.GroupingView;
    import com.sencha.gxt.widget.core.client.grid.editing.GridInlineEditing;


    @Detail(name = "Grouping Grid", icon = "grouping", category = "Grid", classes = {Stock.class, StockProperties.class})
    public class GroupingGridExample implements EntryPoint, IsWidget {


    @Override
    public Widget asWidget() {
    StockProperties properties = GWT.create(StockProperties.class);
    ListStore<Stock> store = new ListStore<Stock>(properties.key());


    store.addAll(TestData.getCompanies());


    List<ColumnConfig<Stock, ?>> cfgs = new ArrayList<ColumnConfig<Stock, ?>>();
    ColumnConfig<Stock, String> name = new ColumnConfig<Stock, String>(properties.name(), 60);
    name.setHeader("Name");
    name.setCell(new TextCell());
    cfgs.add(name);


    ColumnConfig<Stock, Double> price = new ColumnConfig<Stock, Double>(properties.open(), 20);
    price.setHeader("Price");
    cfgs.add(price);
    ColumnConfig<Stock, Double> change = new ColumnConfig<Stock, Double>(properties.change(), 20);
    change.setHeader("Change");
    cfgs.add(change);


    final ColumnConfig<Stock, String> industry = new ColumnConfig<Stock, String>(properties.industry(), 20);
    industry.setHeader("Industry");
    cfgs.add(industry);

    final ColumnConfig<Stock, Date> lastUpdated = new ColumnConfig<Stock, Date>(properties.lastTrans(), 20);
    lastUpdated.setHeader("Last Updated");
    lastUpdated.setCell(new DateCell(DateTimeFormat.getFormat("MM/dd/yyyy")));
    cfgs.add(lastUpdated);


    ColumnModel<Stock> cm = new ColumnModel<Stock>(cfgs);


    final GroupingView<Stock> view = new GroupingView<Stock>();
    view.setShowGroupedColumn(false);
    view.setForceFit(true);


    Grid<Stock> grid = new Grid<Stock>(store, cm);


    // edit the grid
    GridInlineEditing<Stock> gridInlineEdit = new GridInlineEditing<Stock>(grid);
    NumberField<Double> priceEditField = new NumberField<Double>(
    new NumberPropertyEditor.DoublePropertyEditor(null));
    gridInlineEdit.addEditor(price, priceEditField);


    grid.setView(view);
    view.groupBy(industry);


    ContentPanel panel = new ContentPanel();
    panel.setHeadingHtml("Grouping Example");
    panel.setSize("700", "450");
    panel.add(grid);
    panel.addStyleName("margin-10");
    panel.setCollapsible(true);
    return panel;
    }


    @Override
    public void onModuleLoad() {
    RootPanel.get().add(this);
    }


    }
    Attached Images Attached Images

  5. #5
    Sencha User
    Join Date
    Mar 2013
    Posts
    1
    Vote Rating
    0
      0  

    Default

    I've encounter the same problem. It's solved?

  6. #6
    Sencha User
    Join Date
    May 2010
    Posts
    17
    Vote Rating
    0
      0  

    Default

    The problem is not solved ?

  7. #7
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737
    Vote Rating
    93
      0  

    Default

    This appears to be the same issue that was fixed in EXTGWT-1812, documented in http://www.sencha.com/forum/showthread.php?192544 and http://www.sencha.com/forum/showthread.php?249774. A fix for this was made in GXT 3.0.3.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •