Threaded View

  1. #1
    Sencha User
    Join Date
    Oct 2010
    Posts
    13
    Vote Rating
    0
    Hari1611 is on a distinguished road

      0  

    Question Answered: Ext 4 Treepanel context menu not showing at target

    Answered: Ext 4 Treepanel context menu not showing at target


    Ext 4 treepanel context menu not showing at the target node.. My code is as below.. Please anybody help me to resolve it.

    var onContextMenu = function (view, record, item, index, e) {
    var selNode = record;
    if (Ext4.getCmp("mainContext") != null) {
    Ext4.getCmp("mainContext").destroy();
    }
    var menu = createContextMenu(selNode);
    e.preventDefault();
    menu.showAt(item);
    }

    var tree = Ext4.create('Ext4.tree.Panel', {
    animate: true,
    enableDD: true,
    id: "filterTree",
    border: false,
    renderTo: self.containerId,
    store: treeStore,
    rootVisible: false,
    layout: {
    type: 'fit',
    padding: '5',
    align: 'left'
    },
    listeners: {
    afterrender: function () {
    this.getEl().setStyle('height', 'auto');
    this.body.setStyle('height', 'auto');
    this.getView().getEl().setStyle('height', 'auto');
    }
    }
    });
    tree.on('itemcontextmenu', onContextMenu);

    Whats wrong with this code??

  2. Please use CODE tags when posting code (# button on the editor toolbar).

    I believe the problem is with your showAt(). See the example here:

    http://docs.sencha.com/ext-js/4-0/#!...-method-showAt

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar