1. #1
    Sencha Premium Member
    Join Date
    Nov 2009
    Vote Rating
    tomb@ibcos.co.uk is on a distinguished road


    Default groupsummary within columnTree

    groupsummary within columnTree


    I would like to extend Ext.ux.tree.columnTree to display a dynamically calculated total field for each node, calculated from a sum of all its child nodes.

    I've tried a few methods to achieve this functionality but I'm not having much luck. The best method I've come up with is to iterate all nodes within the TreeLoader on the load event. This works with the exception of the root level nodes. For some reason I'm unable to set values on the root level nodes.

    I've come across the following in my travels

    I'm after a cross of the 2, dynamically calculated subtotals for nodes in a grid like view. The ultimate goal is to be able to drag extra items in from another tree and have the totals dynamically update.

    I don't think the following is what I should be doing to achieve this functionality but can't find anything else that does what I need. I've only been using Ext for 2 weeks so if I've missed something obvious please let me know.

    Does anyone have any ideas or pointers?

    	function traverseNodes(node) {
    		if (node.children) {
    			var total = 0;
    			for(var i=0; i<node.children.length; i++){
    				total += traverseNodes(node.children[i]);
    			node.amount = total;
    		return node.amount;
    	var myTreeLoader = new Ext.tree.TreeLoader({
    			'col': Ext.ux.tree.ColumnNodeUI
    			listeners: {
    			load : function(sender, node, callback){
    				for(var i=0; i<node.childNodes.length; i++){
    	var tree = new Ext.ux.tree.ColumnTree({
    		width: 550,
    		height: 300,
    		title: 'Nominals',
    		renderTo: Ext.getBody(),
    		columns:[{header:'Nominal Code', width:330, dataIndex:'nominal'},
    			{header:'Amount', width:100, dataType:'money', dataIndex:'amount'},
    			{header:'Assigned To', width:100, dataIndex:'user'}],
    		loader: myTreeLoader,
    		root: new Ext.tree.AsyncTreeNode({
    The attached image is the output from the above code

    Any help is greatly appreciated


    Attached Images

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