1. #1
    Ext User
    Join Date
    Nov 2009
    Posts
    4
    Vote Rating
    0
    kotovsky is on a distinguished road

      0  

    Default TreeGrid columns fit

    TreeGrid columns fit


    How can I make the columns fit in tree grid? such as in GridPanel viewConfig: {forceFit: true} ?

  2. #2
    Ext User Eugen_'s Avatar
    Join Date
    Feb 2010
    Location
    Tomsk, Russia
    Posts
    106
    Vote Rating
    -5
    Eugen_ is infamous around these parts

      1  

    Default


    Quote Originally Posted by kotovsky View Post
    How can I make the columns fit in tree grid? such as in GridPanel viewConfig: {forceFit: true} ?
    Change the TreeGrid and Ext.tree.ColumnResizer source code

    Code:
    Ext.ux.tree.TreeGrid = Ext.extend(Ext.tree.TreePanel, {
    
        ...
    
        fitColumns: function() {
            var nNewTotalWidth = this.getInnerWidth() - Ext.num(this.scrollOffset, Ext.getScrollBarWidth());
            var nOldTotalWidth = this.getTotalColumnWidth();
            var cs = this.getVisibleColumns();
            var n, nUsed = 0;
            
            for (n = 0; n < cs.length; n++) {
                if (n == cs.length - 1) {
                    cs[n].width = nNewTotalWidth - nUsed - 1;
                    break;
                }
                cs[n].width = Math.floor((nNewTotalWidth / 100) * (cs[n].width * 100 / nOldTotalWidth)) - 1;
                nUsed += cs[n].width;
            }
            
            this.updateColumnWidths();
        },
        
        ...
        
        onResize : function(w, h) {
    
            ...
            
            this.fitColumns();
        },
    
        ...
    
    });
    Code:
    Ext.tree.ColumnResizer = Ext.extend(Ext.util.Observable, {
    
        ...
    
        onEnd : function(e){
    
            ...
        
            //tree.updateColumnWidths();
            tree.fitColumns();
    
        }
    });

Thread Participants: 1

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