Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext User
    Join Date
    Jan 2008
    Posts
    25
    Vote Rating
    0
    smruti_patra is on a distinguished road

      0  

    Default Group summary for column in the grid

    Group summary for column in the grid


    Hi,
    I have one grid with four column with numric data, in the fifth column i want to disaply the sum of firtst four column value.

    Please give me some idea how to create this using group summary.

    I am adding my Grid code below:

    Code:
    var data = Ext.data.Record.create([				
    			{name: 'Goal1'},
    			{name: 'Goal2'},
    			{name: 'Goal3'},
    			{name: 'Goal4'},
     			{name: 'TotalGoal'}
    
    	]); 
    
    
    	var dataStore = new Ext.data.Store({
    			proxy : new Ext.data.HttpProxy({url : 'List.action'}),
    	        reader: new Ext.data.JsonReader({id: "id", root: "jsonGoalList"}, data),
    	        sortInfo:{field: 'Level', direction: "ASC"}
    	});   
      
       var grid4 = new xg.EditorGridPanel({
            id:'button-grid',
            store: dataStore,
    		bbar: pagingbar,
    		plugins:filters,			
            cm: new xg.ColumnModel([
               		
    	        {header: "Goal1", width: 120, sortable: true,dataIndex: 'Goal1',align:'right',
    				editor: new fm.NumberField({ 
    	            allowBlank: false,
    				allowNegative: false
    	            })
    		   },
                {header: "Goal2", width: 135, sortable: true,dataIndex: 'Goal2',align:'right',
    					editor: new fm.NumberField({
    		           allowBlank: false,
    				   allowNegative: false
    	           })
    			},
    			{header: "Goal3",width: 120,sortable: true,dataIndex: 'Goal3',align:'right',
    				editor: new fm.NumberField({
    		           allowBlank: false,
    				  allowNegative: false
    	           })
    			},
                {header: "Goal4", width: 120,sortable: true,dataIndex: 'Goal4',align:'right',
    				editor: new fm.NumberField({
    		           allowBlank: false,
       				   allowNegative: false
    	           })
    			},{header: "totalGoal",width: 120,sortable: true, dataIndex: 'TotalGoal',align:'right',
    				editor: new fm.NumberField({
    		           allowBlank: false,
    				   allowNegative: false
    	           })
    			}
    																							
            ]),
    
            viewConfig: {
                forceFit:false
            },
           
            width:700,
            height:370,
            frame:true,
            autoScroll:true,
            iconCls:'icon-grid'
        });
    Thanks,
    Smruti

  2. #2
    Sencha User castitas's Avatar
    Join Date
    Sep 2011
    Location
    US
    Posts
    116
    Vote Rating
    2
    castitas is on a distinguished road

      0  

    Default


    Add your fifth column with a column renderer that sums all the values in the row. It shouldn't be too hard, since you can uplevel from your cell to the grid, then iterate through the columns at that specific row. I think. Let me know if it works.
    Take a look at the renderer config.
    http://docs.sencha.com/ext-js/4-0/#!....column.Column
    word

Thread Participants: 1