1. #1
    Sencha User
    Join Date
    Apr 2011
    Location
    Saugus, MA
    Posts
    24
    Vote Rating
    0
    igor.astakhov is on a distinguished road

      0  

    Default Ext.grid.feature.Summary && Ext.grid.feature.Grouping

    Ext.grid.feature.Summary && Ext.grid.feature.Grouping


    can someone show me the correct direction to look into.

    I have both of these features on the grid and the Summary shows in every grouping but I only want it to show at the bottom for all of the groupings.

  2. #2
    Sencha User
    Join Date
    Apr 2011
    Location
    Saugus, MA
    Posts
    24
    Vote Rating
    0
    igor.astakhov is on a distinguished road

      0  

    Default


    bump

  3. #3
    Sencha User
    Join Date
    Mar 2011
    Posts
    11
    Vote Rating
    0
    cotrariello is on a distinguished road

      0  

    Default


    i don't understand the problem. explain better

  4. #4
    Sencha User
    Join Date
    Apr 2011
    Location
    Saugus, MA
    Posts
    24
    Vote Rating
    0
    igor.astakhov is on a distinguished road

      0  

    Default


    I want to have the Ext.grid.feature.GroupingSummary with a row that adds a Row of total summary for all the groupings in my Grid View.

    Basically the row that Ext.grid.feature.Summary provides...

    I have buttons on grid in toolbar that onclick either group the data or ungroup but the totals need to appear always.
    And off course the toggle for the summaries.

    If you could help would be super please do.

  5. #5
    Sencha User
    Join Date
    Feb 2011
    Posts
    1
    Vote Rating
    0
    aeg is on a distinguished road

      0  

    Default


    I have the same problem. I want to have one summary row at the bottom of the grid. But adding the summary feature on a grid with grouping places the summary in each group, and at the bottom of the grid. Any solutions?

  6. #6
    Sencha Premium Member
    Join Date
    Feb 2011
    Posts
    12
    Vote Rating
    0
    Qanik is on a distinguished road

      0  

    Default


    Same problem here.

  7. #7
    Sencha User
    Join Date
    Apr 2011
    Location
    Saugus, MA
    Posts
    24
    Vote Rating
    0
    igor.astakhov is on a distinguished road

      0  

    Default


    is what my friend did to make it work
    Code:
    Ext.define( 'BL.view.abstract.grid.feature.Summary',
        {
            extend : 'Ext.grid.feature.Summary'
            ,id    : 'blsummary'
            ,alias : 'feature.blsummary'
    
            ,getPrintData: function(index) {
                if( index ) {
                    var objGrid = Ext.ComponentQuery.query( '#center-container > blgridpanel' ).pop();
                    var objGroupFeature = objGrid.getView().getFeature( 'blgroupingsummary' );
                    return objGroupFeature.getPrintData( index );
                }
                return this.callParent(arguments);
            }
            ,printSummaryRow: function(index) {
    
                if( typeof(index)=='object' ) {
                    if( index.collapsedCls ) {
                        return;
                    }
                    index = undefined;
                }
    
                var inner = this.view.getTableChunker().metaRowTpl.join('');
    
                inner = inner.replace('x-grid-row', 'x-grid-row-summary');
                inner = inner.replace('{{id}}', '{gridSummaryValue}');
                inner = inner.replace(this.nestedIdRe, '{id$1}');
                inner = inner.replace('{[this.embedRowCls()]}', '{rowCls}');
                inner = inner.replace('{[this.embedRowAttr()]}', '{rowAttr}');
                inner = Ext.create('Ext.XTemplate', inner, {
                    firstOrLastCls: Ext.view.TableChunker.firstOrLastCls
                });
    
                return inner.applyTemplate({
                    columns: this.getPrintData(index)
                });
            }
            // Added "values" argument, for hide grid summary in rows
            ,closeRows: function() {
                return '</tpl>{[this.printSummaryRow(values)]}';
            }
        }
    );
    what would you do different ( code is good ).
    Last edited by igor.astakhov; 15 Jul 2011 at 7:17 PM. Reason: grading

  8. #8
    Sencha Premium Member
    Join Date
    Feb 2011
    Posts
    12
    Vote Rating
    0
    Qanik is on a distinguished road

      0  

    Default


    Code:
    	/*
    	 * Start FIX: Summary + Grouping. Without this fix there would be a summary row under each group
    	 * http://www.sencha.com/forum/showthread.php?135442-Ext.grid.feature.Summary-amp-amp-Ext.grid.feature.Grouping
    	 */
    	Ext.override(Ext.grid.feature.Summary, {
    		closeRows: function() {
    	        return '</tpl>{[this.recursiveCall ? "" : this.printSummaryRow()]}';
    	    }
    	});
    	Ext.override(Ext.XTemplate, {
    		recurse : function(values, reference) {
    			this.recursiveCall = true;
    			var returnValue = this.apply(reference ? values[reference] : values);
    			this.recursiveCall = false;
            	return returnValue;
            }
    	});
    	/*
    	 * End FIX: Summary + Grouping. Without this fix there would be a summary row under each group
    	 * http://www.sencha.com/forum/showthread.php?135442-Ext.grid.feature.Summary-amp-amp-Ext.grid.feature.Grouping
    	 */
    this works for me

  9. #9
    Ext Premium Member yyogev's Avatar
    Join Date
    Jun 2009
    Location
    Shoham, Israel
    Posts
    196
    Vote Rating
    6
    yyogev is on a distinguished road

      0  

    Thumbs up After adding the fixes from the post #8, it works

    After adding the fixes from the post #8, it works


    Quote Originally Posted by igor.astakhov View Post
    is what my friend did to make it work
    Code:
    Ext.define( 'BL.view.abstract.grid.feature.Summary',
        {
            extend : 'Ext.grid.feature.Summary'
            ,id    : 'blsummary'
            ,alias : 'feature.blsummary'
    
            ,getPrintData: function(index) {
                if( index ) {
                    var objGrid = Ext.ComponentQuery.query( '#center-container > blgridpanel' ).pop();
                    var objGroupFeature = objGrid.getView().getFeature( 'blgroupingsummary' );
                    return objGroupFeature.getPrintData( index );
                }
                return this.callParent(arguments);
            }
            ,printSummaryRow: function(index) {
    
                if( typeof(index)=='object' ) {
                    if( index.collapsedCls ) {
                        return;
                    }
                    index = undefined;
                }
    
                var inner = this.view.getTableChunker().metaRowTpl.join('');
    
                inner = inner.replace('x-grid-row', 'x-grid-row-summary');
                inner = inner.replace('{{id}}', '{gridSummaryValue}');
                inner = inner.replace(this.nestedIdRe, '{id$1}');
                inner = inner.replace('{[this.embedRowCls()]}', '{rowCls}');
                inner = inner.replace('{[this.embedRowAttr()]}', '{rowAttr}');
                inner = Ext.create('Ext.XTemplate', inner, {
                    firstOrLastCls: Ext.view.TableChunker.firstOrLastCls
                });
    
                return inner.applyTemplate({
                    columns: this.getPrintData(index)
                });
            }
            // Added "values" argument, for hide grid summary in rows
            ,closeRows: function() {
                return '</tpl>{[this.printSummaryRow(values)]}';
            }
        }
    );
    what would you do different ( code is good ).
    A much easier way to get the grid grouping feature:
    Code:
    var grouping = this.view.getFeature("grid grouping feature id");
    Also, since I have a different implementation of printSummaryRow for grouping summary, I added this before "var inner = ...";

    Code:
    if (index != undefined)
        return this.view.getFeature("grid grouping feature id").printSummaryRow(index);
    Thanks Igor & Qanik,
    Yaron Yogev

    IT Software Developer

  10. #10
    Sencha User
    Join Date
    Sep 2010
    Location
    Austria
    Posts
    59
    Vote Rating
    2
    samlinux is on a distinguished road

      1  

    Default


    hi,
    can you post a complete example so that we can unterstand it, thanks

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..." hd porno faketaxi