Results 1 to 8 of 8

Thread: HeaderGroupConfig Column Width Wrong When Grid Contains RowNumberer

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTGWT-3590 in 3.1.
  1. #1
    Sencha Premium Member
    Join Date
    Jan 2014
    Posts
    12

    Default HeaderGroupConfig Column Width Wrong When Grid Contains RowNumberer

    When displaying GXT Grid columns in a HeaderGroupConfig without using the RowNumberer feature, the widths of the columns in the HeaderGroupConfig are correct. If the RowNumberer is added to column 0, the width of the left-most column within the HeaderGroupConfig is the same as the width of the RowNumberer column. If the RowNumberer is added to column 1, the width of the column second from left within the HeaderGroupConfig is the same as the width of the RowNumberer column. The GXT code should be getting the absolute index of the column, not the index relative to its' HeaderGroupConfig, when setting its' width.

    This is simple enough to reproduce, simply add several columns to a HeaderGroupConfig and enable the RowNumberer in column 0. Set the width of the columns to be different than the RowNumberer column, which defaults to 23 pixels. This issue exists in GXT 3.0.6. A screenshot is attached.

    Sample code configuring the Grid:

    Code:
            List<ColumnConfig<M, ?>> columnConfigs = getColumnConfigs();
    
    
            // Add Row Numberer to column 0 if requested...
            RowNumberer<M> rowNumberer = null;
            
            if (isRowNumbered()) {
                IdentityValueProvider<M> identity = new IdentityValueProvider<M>();
                rowNumberer = new RowNumberer<M>(identity);
                columnConfigs.add(0, rowNumberer);
            }
    
    
            // Create the column model for the grid...
            ColumnModel<M> columnModel = new ColumnModel<M>(columnConfigs);
    
    
            // Add header groups if requested...
            List<HeaderGroupConfig> headerGroupConfigs = getHeaderGroups();
    
    
            if (headerGroupConfigs != null) {
                for (HeaderGroupConfig headerGroupConfig : headerGroupConfigs) {
                    columnModel.addHeaderGroup(headerGroupConfig.getRow(),
                            headerGroupConfig.getColumn(), headerGroupConfig);
                }
            }
    Attached Images Attached Images
    Last edited by ccocco-qpid; 17 Feb 2014 at 8:34 AM. Reason: Added screenshot

  2. #2
    Sencha Premium Member
    Join Date
    Nov 2013
    Location
    Boston, MA
    Posts
    23

    Default

    The was also submitted 18 months ago: http://www.sencha.com/forum/showthre...roupConfig-bug

  3. #3
    Sencha User
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737

    Default

    What versions are you seeing this bug in? There were a number of changes in GXT 3.0.5 that were focused in this area which may have resolved this issue.

  4. #4
    Sencha Premium Member
    Join Date
    Nov 2013
    Location
    Boston, MA
    Posts
    23

    Default

    ccocco-qpid and I work together (yes, a conspiracy and we're both using 3.0.6. I tested this using completely different code, and found the same problem, i.e., the presence of a row number is the cause.

  5. #5
    Sencha Sr Product Manager
    Join Date
    Jan 2012
    Location
    Arlington, WA
    Posts
    1,166

    Default

    I've seen this issue occur when there are two IdentityValueProviders with the same path name.

    Could you make the path unique for the value provider and see if that fixes the column header width?

    Maybe something like
    Code:
    new IdentityValueProvider<M>("path");
    Could be EXTGWT-3430...

    Brandon

  6. #6
    Sencha Premium Member
    Join Date
    Nov 2013
    Location
    Boston, MA
    Posts
    23

    Default

    IdentityValueProvider<PatientRecord> identity = new IdentityValueProvider<PatientRecord>("path") did not fix it. Also, I only have one instance of IdentityValueProvider. What is most certainly the case that heading groups is different when you turn numbering on/off

    no numbering
    HeaderGroupConfig config = new HeaderGroupConfig("Stuff", 1, 2);
    getColumnModel().addHeaderGroup(0, 0, config);

    numbering
    HeaderGroupConfig config = new HeaderGroupConfig("Stuff", 1, 2);
    getColumnModel().addHeaderGroup(0, 1, config);


    Attachments are below
    Attached Images Attached Images

  7. #7
    Sencha Sr Product Manager
    Join Date
    Jan 2012
    Location
    Arlington, WA
    Posts
    1,166

    Default

    Thanks for reporting, I have filed a new bug and we will update on progress.

    Brandon

  8. #8
    Sencha User darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242

    Default

    I verified the bug in 3.0.6. This is already fixed and the change will go out in 3.0.7. Also, the bug is fixed already in 3.1 which was just released.

Posting Permissions

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