1. #1
    Ext GWT Premium Member
    Join Date
    Oct 2009
    Posts
    131
    Vote Rating
    3
    zlevardy is on a distinguished road

      0  

    Default Unanswered: How to select Ext.grid.feature.Grouping Header?

    Unanswered: How to select Ext.grid.feature.Grouping Header?


    Can I select somehow the Header itself from a Ext.grid.feature.Grouping?

    thx,
    Zol

  2. #2
    Ext GWT Premium Member
    Join Date
    Oct 2009
    Posts
    131
    Vote Rating
    3
    zlevardy is on a distinguished road

      0  

    Default no scope, no this - or I have not found any of them.

    no scope, no this - or I have not found any of them.


    this will drive me crazy Still no luck.

    Code what does not find a method by on click:
    Code:
    items: {  
    		        xtype: 'grid',
    		        itemId: 'searchGrid',
    		        selModel: Ext.create('Ext.selection.RowModel', { listeners: { select: {fn: me.rowSelect, scope: me } } }),
    		        features: [ Ext.create('Ext.grid.feature.Grouping',{
    		        	groupHeaderTpl: ' <input type="button" onclick="groupSelect" value="select"> {name} ',
    		        	startCollapsed: false, 
    		        	enableGroupingMenu: false,
    		        	collapsible: false,
    		        	fn: {
    		        		groupSelect: function(value) {
    				        	console.log('grp sel: '+value);
    			        	}
    		        	}
    
    		        })],
    		        columns: [ ... ]
      ... }
    Does anybody know how to define any method, what can be called back from a template element? I have already try this. or parent. or Ext.ComponentQuery.query('#an-id')[0] but nothing else execute, just a pure method name.

    Templates can handle functions by docs: http://docs.sencha.com/ext-js/4-0/#!/api/Ext.XTemplate
    Code:
    var tpl =newExt.XTemplate('<p>Name: {name}</p>','<p>Kids: ','<tpl for="kids">','<tpl if="this.isGirl(name)">','<p>Girl: {name} - {age}</p>','</tpl>',// use opposite if statement to simulate 'else' processing:'<tpl if="this.isGirl(name) == false">','<p>Boy: {name} - {age}</p>','</tpl>','<tpl if="this.isBaby(age)">','<p>{name} is a baby!</p>','</tpl>','</tpl></p>',{// XTemplate configuration:        disableFormats:true,// member functions:        isGirl:function(name){return name =='Sara Grace';},        isBaby:function(age){return age <1;}});tpl.overwrite(panel.body, data);
    thanks guys

  3. #3
    Ext GWT Premium Member
    Join Date
    Oct 2009
    Posts
    131
    Vote Rating
    3
    zlevardy is on a distinguished road

      0  

    Default


    updated code. First console echo works. Second try to fire group select is even not called back.

    Code:
    features: [ Ext.create('Ext.grid.feature.Grouping',{
    		        	groupHeaderTpl: 
    		        		Ext.create('Ext.XTemplate',
    ' {[this.groupSelect()]}: <input type="button" onclick="this.groupSelect()" value="select"> {name} ',
    		            		    {
    		            		        groupSelect: function(value) { TpsApp.console('tpl grp sel: '+value); }
    		            		    }
    		        		),
    any idea?

    thanks

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar