Hybrid View

  1. #1
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,405
    Vote Rating
    201
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      1  

    Default [RC1] Grid group headers with sub-column flex

    [RC1] Grid group headers with sub-column flex


    Should a group header in a grid header setup span the width of the component when the sub-columns are config'd with flex 1?

    I'm seeing each sub column at 39 px in IE and Chrome.

    Code:
    Ext.widget('viewport', {
    	layout: 'fit'
    	, items: [{
    		xtype: 'gridpanel'
    		, title: 'Title'
    		, columns: [{
    			text: 'Header'
    			, columns: [{
    				text: 'Name'
    				, dataIndex: 'name'
    				, flex: 1
    			}, {
    				text: 'Name'
    				, dataIndex: 'name'
    				, flex: 1
    			}]
    		}]
    		, store: {
    			fields: ['name']
    			, data: [{
    				name: 'Bob'
    			}, {
    				name: 'Carl'
    			}, {
    				name: 'Bob'
    			}]
    		}
    	}]
    });

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,405
    Vote Rating
    201
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      0  

    Default


    Here is what I get in 4.0.7 and 4.1 RC1 was 39px wide.

    grid-headers.png

  3. #3
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,080
    Vote Rating
    467
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    I believe that 4.07 sub column did not support flex.
    It defaults to width provided by Extjs (200px) as show in your pic.

    If you take your code and remove the flex in 4.1 you will get the same result.

    When using flex, you outer container needs to have a width for flex to behave properly.

    Regards,
    Scott.

  4. #4
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,405
    Vote Rating
    201
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      0  

    Default [RC2] Update with RC2 + screenshot

    [RC2] Update with RC2 + screenshot


    I that case it sounds like it's not possible to have a header flex to the width of the grid if it has a grouped header since the grouping header gets its width from the sum of the child widths. Is that correct?

  5. #5
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,000
    Vote Rating
    649
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Right, that's pretty much the case.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  6. #6
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,405
    Vote Rating
    201
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      0  

    Default


    Gotcha. Just wanted to make sure it wasn't something I was doing/not doing in the config somewhere.

    Thx.

  7. #7
    Sencha User
    Join Date
    Dec 2013
    Posts
    8
    Vote Rating
    0
    yuvabarath is on a distinguished road

      0  

    Default


    Mcouillard's suggestion was good.We have the same work as his case.May i know whether this problem is fixed?/Is there any solution for grouping?

  8. #8
    Ext JS Premium Member mcouillard's Avatar
    Join Date
    Jun 2008
    Location
    Bucks County, PA
    Posts
    104
    Vote Rating
    9
    mcouillard will become famous soon enough

      0  

    Default


    Still an issue in 5.0 beta - hasn't gotten any better.

    I haven't yet been able to put code to my design. It seems that idea plus the example from Eric in 4.1 is the closest we're currently at.

  9. #9
    Sencha User
    Join Date
    Sep 2014
    Posts
    2
    Vote Rating
    0
    ESSS.bertoldi is on a distinguished road

      0  

    Default


    Quote Originally Posted by mcouillard View Post
    Still an issue in 5.0 beta - hasn't gotten any better.

    I haven't yet been able to put code to my design. It seems that idea plus the example from Eric in 4.1 is the closest we're currently at.
    This sadly remains an issue in 5.0.1 version even though it is a very interesting feature.

    In our company we try to create whenever possible columns using flex configurations. This missing feature/bug (IMHO it is a bug considering you get an error for trying to set dimension of grouped column) is very troublesome and for now have implemented a (sadly weak) workaround.

    Are there any plans to implement this feature in the near future?