1. #181
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    83
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Why are you using:
    Code:
    constructor : function(config){
      Ext.apply(this, config);
      Base.Module.Budget.com.QtrGridAir.superclass.constructor.call(this);
    },
    1. That isn't needed.
    2. If you have to, you should be using:
    Code:
    constructor : function(config){
      Base.Module.Budget.com.QtrGridAir.superclass.constructor.call(this, config);
    },

  2. #182
    Ext User
    Join Date
    Sep 2008
    Posts
    41
    Vote Rating
    0
    xevin is on a distinguished road

      0  

    Default


    Hi Condor, thanks, i removed the constructor part.. i updated it:

    Code:
    	var _groupingView = Ext.extend(Ext.grid.GroupingView, {
    		forceFit: false,
    		showGroupName: true,
    		ignoreAdd: true,
            enableNoGroups: false,
    	    emptyText: 'There are no list to show in this list.',
    		groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})'
    	});
    
    ..
    ..
    ..
    
    	var _dataStore = new Ext.data.GroupingStore({
    		reader: new Ext.data.JsonStore({
    			url		: '',
    			root	: 'records',
    			fields	: _fields
    	    }),
    		sortInfo:{field: 'acccode', direction: "ASC"},
    		groupField: 'acccode'
    	});
    
    ..
    ..
    ..
    
    Base.Module.Budget.com.QtrGridAir = Ext.extend(Ext.grid.EditorGridPanel, {
    		
    		cm: _colModel,
    		ds: _dataStore,
    		plugins: [_columnGroups],
    		view: new _groupingView(),
    		stripeRows: true,
    		collapsible: true,
        	animCollapse: true,
    				
    		Record: {
    			_store: _dataStore,
    			_record: new Ext.data.Record(),
    			
    			setStore: function(store) {
    				this._store = store;
    			},
    			
    			insert: function(n, v) {
    				this._record.set(n, v);
    			},
    			
    			save: function() {
    				if (typeof this._store === 'object')
    					this._store.add(this._record);
    				
    				this._record = new Ext.data.Record();
    			}
    		}
    		
    	});
    Im having this error:

    Code:
    TypeError: Undefined value
    
     at app:/References/Ext/plugin/GroupHeaderGrid/GroupHeaderGrid.js : 117
    
     at app:/References/Ext/All.js : 9
    
     at app:/References/Ext/Base.js : 7
    
     at app:/References/Ext/All.js : 9
    
     at app:/References/Ext/All.js : 9
    
     at app:/References/Ext/All.js : 13
    
     at app:/References/Ext/All.js : 13
    
    y at app:/References/Ext/All.js : 9
    
    undefined at undefined : undefined
    Called using..........

    Code:
    (function(){
    	
    	System.Util.embCSS('app:/References/Ext/plugin/GroupHeaderGrid/GroupHeaderGrid.css');
    	
    	var tpl_department_cbo = new Ext.XTemplate(
    		'<tpl for="."><div class="x-combo-list-item">{value}</div></tpl>'
    	);
    	
    	var QtrGridAir = new Base.Module.Budget.com.QtrGridAir({ region: 'center' });
    				
    	/** Module Base */
    	//Module('Base.Module.Budget', {
    		
    	//	newBudget: function() {
    			
    			QtrGridAir.Record.insert('acccode', '144');
    			QtrGridAir.Record.insert('itemdesc', 'Simpson');
    			QtrGridAir.Record.save();
    			QtrGridAir.Record.insert('acccode', '655');
    			QtrGridAir.Record.insert('itemdesc', 'Buy Lic.');
    			QtrGridAir.Record.save();
    						
    			var form = new Ext.form.FormPanel({
    				plain		: true,
    				border		: false,
    				bodyBorder	: false,
    				bodyStyle	: { 'background': 'transparent !important' },
    				layout		: 'border',
    				
    				items: [
    					{
    						region		: 'north',
    						layout		: 'column',
    						xtype		: 'form',
    						plain		: true,
    						border		: false,
    						borderBody	: false,
    						height		: 110,
    						bodyStyle	: { 'padding': '10px 0px 0px 0px', 'background': 'transparent !important' },
    						defaults	: { border: false, bodyStyle: { 'background': 'transparent !important' } },
    						
    						items: [{
    							layout		: 'form',
    							columnWidth	: .5,
    							 
    							items: [{
    								xtype			: 'combo',
    						        mode			: 'local',
    						        triggerAction	: 'all',
    						        emptyText		: 'Select a Department...',
    								fieldLabel		: 'Department',
    								name			: 'department',
    								typeAhead		: true,
    						        selectOnFocus	: true,
    						        anchor			: '95%',
    								tpl				: tpl_department_cbo
    						    },
    							{
    								xtype			: 'textarea',
    								name			: 'comment',
    								fieldLabel		: 'Comment',
    								anchor			: '95%'
    							}]
    						}]
    					},
    					QtrGridAir
    				]
    			});
    			
    			var win = new Ext.Window({
    				title		: $('budget_menu_newbudget'),
    				height		: 500,
    				width		: 800,
    				resizable	: true,
    				constrain	: true,
    				plain		: true,
    				autoShow	: true,
    				maximizable	: true,
    				bodyBorder	: false,
    				border		: false,
    				bodyStyle	: { 'background': 'transparent !important', 'padding': '0px 5px 0px 5px' },
    				layout		: 'fit',
    				iconCls		: 'x-appico-coins',
    				renderTo	: Base.UI.getFrame().getEl(),
    				items		: [ form ],
    				
    				fbar: new Ext.Toolbar({
    					items: [
    						{ text: 'Save as Draft', xtype: 'tbsplit', menu: {} },
    						{ xtype: 'tbfill' },
    						{ text: 'Save' },
    						{ text: 'Cancel' }
    					]
    				})
    			});
    			
    			win.show();
    	//	}
    		
    	//});
    	
    })();
    Im confused, because, i just copied the example and added some complicated fields, it Groups out when u click the Group by this column but it shows those errors in console.. By the way im using this in air..

  3. #183
    Ext User
    Join Date
    Sep 2008
    Posts
    41
    Vote Rating
    0
    xevin is on a distinguished road

      0  

    Default


    Duh, nevermind Condor, jajaja, although i posted much everything, sorry for the wasted KB's... iv rethinked my core to air and move it to non-sandbox mode.. and just bind some air to bridgeProxy.. thanks for the inputs

  4. #184
    Ext User
    Join Date
    Dec 2007
    Posts
    8
    Vote Rating
    0
    DevNullBinary is on a distinguished road

      0  

    Default




    How can I disable the context menu from supergroup cell ? I mean disable the context menu on Before, After, Merchandise and Sum cell.

    Configuration option "menuDisabled: true" seems not to work properly in this case.

  5. #185
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    83
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    There is no config option for that, but you can use a css rule:
    Code:
    .ux-grid-hd-group-cell .x-grid3-hd-btn {display: none;}

  6. #186
    Ext User
    Join Date
    Dec 2007
    Posts
    8
    Vote Rating
    0
    DevNullBinary is on a distinguished road

      0  

    Default


    actually I've patched the plugin for such a option:

    Code:
    btn: this.grid.enableHdMenu && group.header && !group.menuDisabled
    but the header cell is still active and do the sort after clicking. Is there any way how to disable this behaviour ?

    Quote Originally Posted by Condor View Post
    There is no config option for that, but you can use a css rule:
    Code:
    .ux-grid-hd-group-cell .x-grid3-hd-btn {display: none;}

  7. #187
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    83
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    So you want none of the group header cells to do anything?

    The easiest way to do that is by removing the x-grid3-hd class from gcell template.

  8. #188
    Ext User
    Join Date
    Dec 2007
    Posts
    8
    Vote Rating
    0
    DevNullBinary is on a distinguished road

      0  

    Default


    Not exactly. I need the superheader column stay resizable.
    Any option, which disable the click event (sorting) on superheader cell. Or how can I do that.

  9. #189
    Ext User
    Join Date
    Dec 2007
    Posts
    8
    Vote Rating
    0
    DevNullBinary is on a distinguished road

      0  

    Default


    In other words, I need to disable sorting on specified supergroup.

  10. #190
    Ext User
    Join Date
    Dec 2007
    Posts
    8
    Vote Rating
    0
    DevNullBinary is on a distinguished road

      0  

    Default


    I got it!
    Anyway thank for your time.