Success! Looks like we've fixed this one. According to our records the fix was applied for a bug in our system in a recent build.
  1. #1
    Ext GWT Premium Member
    Join Date
    Dec 2011
    Location
    Earth
    Posts
    243
    Vote Rating
    1
    nbuesing is on a distinguished road

      0  

    Default When Column in Grid is hidden, editor doesn't adjust

    When Column in Grid is hidden, editor doesn't adjust


    If I hide a column (columnModel.getColumn(1).setHidden(true), the editor no longer shows up over the cell as expected, instead it still renders as though the column wasn't hidden (so it ends up being rendered, in this case, straddling 1/2 of the column it is editing and 1/2 of the next column.

    See screenshots.

    HiddenColumns_EditorAlignment.jpg

    HiddenColumns_EditorAlignment_2.jpg

  2. #2
    Ext GWT Premium Member
    Join Date
    Dec 2011
    Location
    Earth
    Posts
    243
    Vote Rating
    1
    nbuesing is on a distinguished road

      0  

    Default patch file

    patch file


    Here is a patch to the GridInlineEditor so hidden columns are taken into account.

    Code:
    ### Eclipse Workspace Patch 1.0
    #P Ext GWT
    Index: com.sencha.gxt.ui/src/main/java/com/sencha/gxt/widget/core/client/grid/editing/GridInlineEditing.java
    ===================================================================
    --- com.sencha.gxt.ui/src/main/java/com/sencha/gxt/widget/core/client/grid/editing/GridInlineEditing.java    (revision 2068)
    +++ com.sencha.gxt.ui/src/main/java/com/sencha/gxt/widget/core/client/grid/editing/GridInlineEditing.java    (working copy)
    @@ -19,10 +19,10 @@
     import com.sencha.gxt.widget.core.client.ComponentHelper;
     import com.sencha.gxt.widget.core.client.event.BeforeStartEditEvent;
     import com.sencha.gxt.widget.core.client.event.BlurEvent;
    +import com.sencha.gxt.widget.core.client.event.BlurEvent.BlurHandler;
     import com.sencha.gxt.widget.core.client.event.CancelEditEvent;
     import com.sencha.gxt.widget.core.client.event.CompleteEditEvent;
     import com.sencha.gxt.widget.core.client.event.StartEditEvent;
    -import com.sencha.gxt.widget.core.client.event.BlurEvent.BlurHandler;
     import com.sencha.gxt.widget.core.client.form.CheckBox;
     import com.sencha.gxt.widget.core.client.form.Field;
     import com.sencha.gxt.widget.core.client.form.TriggerField;
    @@ -233,7 +233,9 @@
     
               int left = 0;
               for (int i = 0; i < cell.getCol(); i++) {
    -            left += getEditableGrid().getColumnModel().getColumnWidth(i);
    +              if (!getEditableGrid().getColumnModel().isHidden(i)) {
    +                  left += getEditableGrid().getColumnModel().getColumnWidth(i);
    +              }
               }
     
               field.getElement().setLeftTop(left, row.getOffsetTop());

  3. #3
    Ext GWT Premium Member
    Join Date
    Dec 2011
    Location
    Earth
    Posts
    243
    Vote Rating
    1
    nbuesing is on a distinguished road

      0  

    Default


    I have reported this bug a long time ago (to where i have forgotten about it). I removed my work around in my code and I see the issue still exists.

    This is a simple fix (and even provided patch file on how to fix it).

    Please provide feedback on this, it should be part of the 3.0 release IMHO.

  4. #4
    Ext GWT Premium Member gdlm's Avatar
    Join Date
    Jan 2012
    Location
    Belgium
    Posts
    208
    Vote Rating
    3
    gdlm is on a distinguished road

      0  

    Default


    There's probably a relation with this issue

  5. #5
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,241
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    Fixed in SVN (rev 2727).

    Fix can be seen here http://staging.sencha.com:8080/examp...needitablegrid

  6. #6
    Sencha User WesleyMoy's Avatar
    Join Date
    Oct 2009
    Location
    Redwood City, California
    Posts
    402
    Vote Rating
    2
    WesleyMoy is on a distinguished road

      0  

    Default


    The fix for this bug has been included in the public release of Sencha GXT 3.0.0. You should now see the fix included in the Sencha GXT 3.0.0 Explorer demo.

  7. #7
    Sencha User
    Join Date
    Jun 2011
    Posts
    12
    Vote Rating
    0
    Firelight is on a distinguished road

      0  

    Default


    The bug matters in case of initial render with initially hidden column.
    GXT 3.0.1GPL

    Maybe a workaround exists?
    Last edited by Firelight; 23 Jul 2013 at 11:01 PM. Reason: gxt version

  8. #8
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,634
    Vote Rating
    80
    Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice

      0  

    Default


    According to earlier remarks, this was fixed in 3.0.0, which is before 3.0.1. Can you provide a working test case that demonstrates the issue you are having? It might be a different one than what was originally fixed here.

  9. #9
    Sencha User
    Join Date
    Jun 2011
    Posts
    12
    Vote Rating
    0
    Firelight is on a distinguished road

      0  

    Default


    Here it is. It renders the hidden field content even.

    Code:
    package client;
    
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.core.client.GWT;
    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.button.TextButton;
    import com.sencha.gxt.widget.core.client.container.CardLayoutContainer;
    import com.sencha.gxt.widget.core.client.event.SelectEvent;
    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 java.util.ArrayList;
    import java.util.List;
    
    
    public class TestEntryPoint implements EntryPoint {
    
    
        private static final SampleProperties props = GWT.create(SampleProperties.class);
    
    
        public void onModuleLoad() {
            RootPanel panel = RootPanel.get();
            final CardLayoutContainer card = new CardLayoutContainer();
            TextButton btn = new TextButton("Click me!");
            btn.addSelectHandler(new SelectEvent.SelectHandler() {
                @Override
                public void onSelect(SelectEvent selectEvent) {
                    List<ColumnConfig<Sample, ?>> cols = new ArrayList<ColumnConfig<Sample, ?>>();
                    ColumnConfig<Sample, String> col = new ColumnConfig<Sample, String>(props.address(), 100, "Address");
                    col.setHidden(true);
                    cols.add(col);
    
    
                    col = new ColumnConfig<Sample, String>(props.name(), 100, "Name");
                    cols.add(col);
    
    
                    Grid<Sample> grid = new Grid<Sample>(new ListStore<Sample>(props.id()), new ColumnModel<Sample>(cols));
                    grid.getStore().add(new Sample(1, "SampleName", "SampleAddress"));
                    card.add(grid);
                    card.setActiveWidget(grid);
                }
            });
            panel.add(card);
            panel.add(btn);
        }
    
    
        interface SampleProperties extends PropertyAccess<Sample> {
            ModelKeyProvider<Sample> id();
    
    
            ValueProvider<Sample, String> name();
            ValueProvider<Sample, String> address();
        }
    
    
        class Sample {
            private int id;
            private String name;
            private String address;
    
    
            public Sample(int id, String name, String address) {
                this.id = id;
                this.name = name;
                this.address = address;
            }
    
    
            String getAddress() {
                return address;
            }
    
    
            void setAddress(String address) {
                this.address = address;
            }
    
    
            int getId() {
                return id;
            }
    
    
            void setId(int id) {
                this.id = id;
            }
    
    
            String getName() {
                return name;
            }
    
    
            void setName(String name) {
                this.name = name;
            }
        }
    }
    Last edited by Firelight; 25 Jul 2013 at 5:05 AM. Reason: misc

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