You found a bug! We've classified it as EXTJS-8172 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member
    Join Date
    Jan 2010
    Location
    Vancouver, Canada
    Posts
    133
    Vote Rating
    10
    bogc will become famous soon enough

      2  

    Default {renderedGroupValue} in groupHeaderTpl not working

    {renderedGroupValue} in groupHeaderTpl not working


    Ext version tested:
    • Ext 4.2 Beta

    Browser versions tested against:
    • Chrome 23.0.1271.97 m
    Description:

    According to the documentation, http://docs.sencha.com/ext-js/4-1/#!...ature.Grouping, {renderedGroupValue} is:

    The rendered value of the groupField for the group header being rendered, as produced by the column renderer.
    and {name} is:

    An alias for renderedGroupValue
    {renderedGroupValue} doesn't work, while {name} works.

    Please note that I like much better using the {renderedGroupValue} variable since it conveys clearly the meaning of the variable. {name} is confusing. If you look at the groupgrid.js sample 'name' is the dataIndex (or name) of the column that contains the restaurant names.

    Steps to reproduce the problem:
    The result that was expected:
    • The group header to contain the cuisine value after the word 'Cuisine:' .

    The result that occurs instead:
    • The cuisine is value is not displayed
    Test Case:

    Don't have one. I will leave up to you to create one.

    Operating System:
    • Windows 7 64 bit

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Vote Rating
    827
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Thanks for the report.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User fabio.policeno's Avatar
    Join Date
    Sep 2010
    Location
    Curitiba - PR / Brasil
    Posts
    302
    Vote Rating
    4
    fabio.policeno is on a distinguished road

      0  

    Default Possible fix

    Possible fix


    Code:
    Ext.define('Overrides.grid.feature.Grouping', {	override: 'Ext.grid.feature.Grouping',
        
        setupRowData: function(record, idx, rowValues) {
            var me = this,
                data = me.refreshData,
                groupInfo = me.groupInfo,
                header = data.header,
                groupField = data.groupField,
                store = me.view.dataSource,
                grouper, groupName, prev, next,
                column = me.dataSource.grid.down('gridcolumn[dataIndex=' + groupField + ']'); //override
    
    
            rowValues.isCollapsedGroup = false;
            rowValues.summaryRecord = null;
    
    
            if (data.doGrouping) {
                grouper = me.view.store.groupers.first();
                groupName = grouper.getGroupString(record);
    
    
                // See if the current record is the last in the group
                rowValues.isFirstRow = idx === 0;
                if (!rowValues.isFirstRow) {
                    prev = store.getAt(idx - 1);
                    // If the previous row is of a different group, then we're at the first for a new group
                    if (prev) {
                        // Must use Model's comparison because Date objects are never equal
                        rowValues.isFirstRow = !prev.isEqual(grouper.getGroupString(prev), groupName);
                    }
                }
    
    
                // See if the current record is the last in the group
                rowValues.isLastRow = idx == store.getTotalCount() - 1;
                if (!rowValues.isLastRow) {
                    next = store.getAt(idx + 1);
                    if (next) {
                        // Must use Model's comparison because Date objects are never equal
                        rowValues.isLastRow = !next.isEqual(grouper.getGroupString(next), groupName);
                    }
                }
    
    
                if (rowValues.isFirstRow) {
                    groupInfo.groupField = groupField;
                    groupInfo.name = groupName;
                    groupInfo.groupValue = record.get(groupField);
                    groupInfo.columnName = header ? header.text : groupField;
                    groupInfo.renderedGroupValue = column && column.renderer ? column.renderer(groupName, null, record) : groupName; //override
    
    
                    rowValues.collapsibleCls = me.collapsible ? me.collapsibleCls : me.hdNotCollapsibleCls;
                    rowValues.groupId = me.createGroupId(groupName);
    
    
                    if (!me.isExpanded(groupName)) {
                        rowValues.itemClasses.push(me.hdCollapsedCls);
                        rowValues.isCollapsedGroup = true;
                    }
    
    
                    // We only get passed a GroupStore if the store is not buffered
                    if (store.buffered) {
                        groupInfo.rows = groupInfo.children = [];
                    } else {
                        groupInfo.rows = groupInfo.children = me.getRecordGroup(record).children;
                    }
                    rowValues.groupInfo = groupInfo;
                }
    
    
                if (rowValues.isLastRow) {
                    // Add the group's summary record to the last record in the group
                    if (me.showSummaryRow) {
                        rowValues.summaryRecord = data.summaryData[groupName];
                    }
                }
            }
        }
    });

  4. #4
    Ext JS Premium Member
    Join Date
    Jun 2011
    Location
    St. Louis
    Posts
    212
    Vote Rating
    9
    jimmylu98 will become famous soon enough

      1  

    Default


    Looks like this bug is still in 4.2.1GA. Please fix the bugs.

    The same bug was in 4.0.x and fixed in 4.1.1A.

  5. #5
    Ext JS Premium Member anselmtmcclain's Avatar
    Join Date
    Mar 2008
    Location
    Northern California
    Posts
    76
    Vote Rating
    1
    anselmtmcclain is on a distinguished road

      0  

    Default


    Still seeing this bug in ExtJS5 - should it be re-filed in the 5.x bugs forum, or is this open ticket mean that it's still being worked on generally?

  6. #6
    Sencha Premium Member poloyc's Avatar
    Join Date
    Jul 2010
    Location
    Torreon
    Posts
    4
    Vote Rating
    0
    poloyc is on a distinguished road

      0  

    Default


    Same problem here! Neither name or renderedGroupValue not working! I get the value before render.

  7. #7
    Sencha User makana's Avatar
    Join Date
    Apr 2008
    Location
    Dresden, Germany
    Posts
    527
    Vote Rating
    19
    makana has a spectacular aura about makana has a spectacular aura about

      0  

    Default


    I also wondered about what happened to the grouping feature since Ext 4.

    That's the fix I used so long:
    Code:
    /**
     * @class Ext.override.grid.feature.Grouping
     * @override Ext.grid.feature.Grouping
     * Grouping bug fixes.
     * @date 2013-04-24
     */
    Ext.define('Ext.override.grid.feature.Grouping', {
    	override: 'Ext.grid.feature.Grouping',
    
    	/**
    	 * @inheritdoc
    	 */
    	setupRowData: function(record, idx)
    	{
    		var me = this,
    			data = me.refreshData,
    			groupInfo = me.groupInfo,
    			header = data.header,
    			view = me.view,
    			store = view.dataSource;
    		me.callParent(arguments);
    
    		groupInfo.name = groupInfo.renderedGroupValue = groupInfo.groupValue;
    		if (header && header.renderer && header.renderer.call)
    			groupInfo.name = groupInfo.renderedGroupValue = header.renderer.call(
    				header.scope || view.ownerCt,
    				groupInfo.groupValue,
    				{}, // unused
    				record,
    				idx,
    				header.getOwnerHeaderCt().getHeaderIndex(header),
    				store,
    				view);
    	}
    });
    Programming today is a race between software engineers striving to build bigger and better іdiot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)

    Enhanced ExtJS adapter for Adobe AIR

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."