Hybrid View

  1. #1
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,789
    Vote Rating
    167
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      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
    4,789
    Vote Rating
    167
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      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
    8,868
    Vote Rating
    438
    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
    4,789
    Vote Rating
    167
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      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
    16,645
    Vote Rating
    583
    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
    4,789
    Vote Rating
    167
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      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
    103
    Vote Rating
    8
    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.