Results 1 to 2 of 2

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

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Oct 2007
    Vote Rating

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


    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 ({
    reader: new ({
    root: 'snpRows',
    totalProperty: 'totalSnp',
    id: 'snpId'


    dataStore.loadData (JsonData);

    var colModelArray = [];
    for (var i=0; i < len; i++){
    {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

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


    Attached Images Attached Images

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts