Threaded View

  1. #1
    Sencha User
    Join Date
    Oct 2007
    Posts
    447
    Vote Rating
    0
    mxu is on a distinguished road

      0  

    Default how to enable grid geader sorting context menu and catch the click event on it ?

    how to enable grid geader sorting context menu and catch the click event on it ?


    hi,

    I have a grid panel and there is a header context menu, but the sorting menu gets disabled.
    ow can I enable the sorting ASC/DES menu and handle the clicking event on it ?

    besides, the sorting is on grid's datastore ?

    here is the code for the grid.
    ///////////////////////////////////////////////////////////////////

    function snpGrid_universal (divId, JsonData)
    {

    var len = JsonData.col_headers.length;


    var dataStore = new Ext.data.Store ({
    reader: new Ext.data.JsonReader ({
    root: 'snpRows',
    totalProperty: 'totalSnp',
    id: 'snpId'
    },
    JsonData.snpRows_index

    )

    });
    dataStore.loadData (JsonData);

    var colModelArray = [];
    for (var i=0; i < len; i++){
    colModelArray.push(
    {header: JsonData.col_headers[i], dataIndex: JsonData.snpRows_index[i], tooltip: JsonData.col_header_desc[i], width: JsonData.col_widths[i], align:JsonData.col_aligns[i], sortable: true }
    );
    }

    var columnModel = new Ext.grid.ColumnModel (colModelArray );

    var snpTable = new Ext.grid.GridPanel ({
    ds: dataStore,
    cm: columnModel,
    id: divId,
    applyTo: divId,
    height: 140,
    width: 720,
    enableHdMenu: true,
    loadMask: true

    });
    snpTable.render;
    // hide sort menus
    snpTable.view.hmenu.on('beforeshow',function() {
    //snpTable.view.hmenu.items.get(0).hide();
    //snpTable.view.hmenu.items.get(1).hide();
    snpTable.view.hmenu.items.get(2).hide();
    //var colsubMenu = snpTable.view.hmenu.items.get(3);
    //if(colsubMenu)
    // colsubMenu.???;
    });

    }

    //////////////////////////////////////////////////////////////////////
    Attached Images

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