1. #1
    Ext User tinnt's Avatar
    Join Date
    Apr 2008
    Location
    vietnam
    Posts
    34
    Vote Rating
    0
    tinnt is on a distinguished road

      0  

    Default Gridview: customize header column display

    Gridview: customize header column display


    Hello all,

    I have a grid which have > 50 columns, there are many column have property menuDisable:true to disable header menu and some column have menuDisable:false to show header menu. My grid work well, but not good for Look And Feel, because of the many columns I have, so that I must use mouse to check what column have header menu.
    I read the source code and i see that
    Code:
     this.mainHd.on("mouseover", this.handleHdOver, this);
    
     // private
        handleHdOver : function(e, t){
            var hd = this.findHeaderCell(t);
            if(hd && !this.headersDisabled){
                this.activeHd = hd;
                this.activeHdIndex = this.getCellIndex(hd);
                var fly = this.fly(hd);
                this.activeHdRegion = fly.getRegion();
                if(!this.cm.isMenuDisabled(this.activeHdIndex)){
                    fly.addClass("x-grid3-hd-over");
                    this.activeHdBtn = fly.child('.x-grid3-hd-btn');
                    if(this.activeHdBtn){
                        this.activeHdBtn.dom.style.height = (hd.firstChild.offsetHeight-1)+'px';
                    }
                }
            }
        },
    Unfortunately my JS skill is not enough for understand. and I cannot customize it.

    I try with my code: but it not work well with FF. IE show the arrow header menu, but FF not show arrow header.
    Code:
    function subset_column_highlight(){
        colCount = grid.view.cm.getColumnCount();
        var fields_search = new Array('vendor-item-id', 'vendor-name', 'vendor-item-desc', 'mfr-item-id', 'mfr-name', 'mfr-item-desc', 'org-item-desc', 'org-item-id');
    	for (i=0; i<colCount; i++){
            if (fields_search.indexOf(grid.view.cm.config[i].dataIndex) == -1){
                //nothing
            }
            else{
                if (grid.view.getHeaderCell(i).className.indexOf("x-grid3-hd-menu-open") ==-1){
                    grid.view.getHeaderCell(i).className=grid.view.getHeaderCell(i).className+" x-grid3-hd-menu-open";
                }
            }
    
        }
    
    }
    And I get a result as the picture below ( IE - FF )

    Can someone show me another way easier ,,, thank you very much, sorry for my bad English

    Regard.

    Tinnt
    Attached Images

  2. #2
    Touch Premium Member msinn's Avatar
    Join Date
    Jul 2009
    Location
    in front of my pc
    Posts
    280
    Vote Rating
    5
    msinn is on a distinguished road

      0  

    Default


    Hi,

    I have the same problem.
    How can I always set the arrow header menu to be displayed, not just on mouseover.

    Maybe somebody know it, thx
    First I would like to thank you for your time and knowledge

    Win 7 Ext JS 4.1.3 IE(6-9), FF17

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