1. #1
    Ext JS Premium Member
    Join Date
    Jul 2008
    Posts
    15
    Vote Rating
    0
    courtneyt is on a distinguished road

      0  

    Default Grid Grouping View not showing + and - sign before group.

    Grid Grouping View not showing + and - sign before group.


    I am working in Adobe Air and when I use a grouping view for a grid, the + and - sign is not showing before the group. I am using Extjs 3.1.0 and Extjs Air 3.1.

    Code:
    Ext.apply(this, {
       title: myDate + ' - ' + myDay,
       border: true,
       frame: false,
       store: myStore,
       selModel: new Ext.grid.RowSelectionModel({singleSelect: true}),
       colModel: myColumnModel,
       stripeRows: true,
       animCollapse: false,
       view: new Ext.grid.GroupingView({
                  forceFit: true
                })
        });
    groupingview.jpg
    Attached Images

  2. #2
    Sencha User makana's Avatar
    Join Date
    Apr 2008
    Location
    Dresden, Germany
    Posts
    527
    Vote Rating
    19
    makana has a spectacular aura about makana has a spectacular aura about

      0  

    Default


    What ext-air package do you use?
    Try this one.
    I remember there was something with the gridview templates but I got rid of it long time ago.
    Programming today is a race between software engineers striving to build bigger and better іdiot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)

    Enhanced ExtJS adapter for Adobe AIR

  3. #3
    Ext JS Premium Member
    Join Date
    Jul 2008
    Posts
    15
    Vote Rating
    0
    courtneyt is on a distinguished road

      0  

    Default


    I found the fix to the problem. Here is what I needed to add before my onReady()

    Code:
    Ext.grid.GroupingView.prototype.startGroup = new Ext.XTemplate(
    	'<div id="{groupId}" class="x-grid-group {cls}">',
    		'<div id="{groupId}-hd" class="x-grid-group-hd" style="{style}"><div class="x-grid-group-title">{groupTextTpl}</div></div>',
    		'<div id="{groupId}-bd" class="x-grid-group-body">'
    );
    Ext.grid.GroupingView.prototype.groupTextTpl = new Ext.XTemplate('{text}');
     
    Ext.override(Ext.grid.GroupingView, {
    	doGroupStart : function(buf, g, cs, ds, colCount){
    		buf[buf.length] = this.startGroup.apply(Ext.apply({
    			groupTextTpl: this.groupTextTpl.apply(g)
    		}, g));
    	}
    });

  4. #4
    Sencha User makana's Avatar
    Join Date
    Apr 2008
    Location
    Dresden, Germany
    Posts
    527
    Vote Rating
    19
    makana has a spectacular aura about makana has a spectacular aura about

      0  

    Default


    Quote Originally Posted by courtneyt View Post
    I found the fix to the problem. Here is what I needed to add before my onReady()
    Of course, you can pick out some code snippets to fix your bugs, but I recommend to use the whole adapter instead. There are many more bug fixes and features which are handled in it (espacially template fixes, highly improved sqlite functionality and window handling).
    Programming today is a race between software engineers striving to build bigger and better іdiot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)

    Enhanced ExtJS adapter for Adobe AIR

Thread Participants: 1