Results 1 to 4 of 4

Thread: Context menu hides when i click combo scroll .How to avoid this issue.?

  1. #1

    Question Context menu hides when i click combo scroll .How to avoid this issue.?

    Hi ,
    I have added menu as context-menu in a grid, in that i have added combo as an item,when i click scroll of the combo,the menu is hiding, how can i avoid this problem.
    for your reference, i have done sample code with static data, pls look on it and provide solution..

    **************


    Ext.onReady(function() {

    Ext.QuickTips.init();
    var arrayData = [
    ['J', 'MD'],
    ['A', 'VA'],
    ['S', 'DC'],
    ['M', 'DE'],
    ['B', 'NJ'],
    ['N', 'CA']
    ];

    var store = new Ext.data.ArrayStore({
    data : arrayData,
    fields : ['fullName', 'state']
    });

    var cm = new Ext.grid.ColumnModel([
    {
    header : 'Full Name',
    sortable : true,
    dataIndex : 'fullName'
    },
    {
    header : 'State',
    dataIndex : 'state'
    }
    ]);

    var gridView = new Ext.grid.GridView();
    var selModel = new Ext.grid.RowSelectionModel({
    singleSelect : true
    })

    var grid = new Ext.grid.GridPanel({
    title : 'Our first grid',
    renderTo : Ext.getBody(),
    autoHeight : true,
    width : 250,
    store : store,
    view : gridView,
    colModel : cm,
    selModel : selModel
    });
    var ctxMenu = new Ext.menu.Menu({
    items: [
    {text: 'Item1'},
    {
    xtype: 'combo',
    autoScroll : true,
    name: 'value',
    fieldLabel: 'Value',
    mode: 'local',
    store: new Ext.data.SimpleStore({
    fields: ['id', 'value'],
    data : [['1','A'],['2','B'],['3','C'],['1','A'],['2','B'],['3','C'],['1','A'],['2','B'],['3','C'],['1','A'],['2','B'],['3','C'],['1','A'],['2','B'],['3','C'],['1','A'],['2','B'],['3','C'],['1','A'],['2','B'],['3','C'],['1','A'],['2','B'],['3','C'],['1','A'],['2','B'],['3','C']]
    }),
    displayField:'value',
    width: 130,
    listeners: {
    select: function(f,r,i){
    Ext.Msg.alert('Title',i);
    }
    }
    }
    ]
    });
    grid.on('rowcontextmenu', function(grid, rowIndex, event){
    ctxMenu.showAt(event.getXY());
    event.preventDefault();
    });


    });




    **************
    Thanks In advance

  2. #2
    Sencha Developer
    Join Date
    Sep 2008
    Location
    Antioch, IL
    Posts
    1,516

    Default

    First, be sure to use the CODE tags (# in the WYSIWYG) when posting code... easier to read that way.

    Have you tried using the "ignoreParentClicks" config for your Ext.menu.Menu()? I don't know for sure if that will work, but it's worth a shot.

  3. #3

    Default

    hi arthurakay,, thnks for reply
    i tried to edit the code as understandable but i cant,what is WYSIWYG ?
    then the property also not working man, i am not identified any difference with that property.

  4. #4
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    It's a bit of a hack, but you can configure the combobox with listClass:'x-menu'.

Similar Threads

  1. righ mouse click - context menu vs drag'n'drop - measure click-hold time
    By johnrembo in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 7 Oct 2010, 11:06 AM
  2. Right Click Context Menu
    By marman in forum Ext GWT: Help & Discussion (1.x)
    Replies: 3
    Last Post: 12 Nov 2009, 12:08 PM
  3. Replies: 1
    Last Post: 10 Nov 2009, 4:43 PM
  4. Mouse click does not work on menu items(when menu is rendered as context menu)
    By anilcs0405 in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 3 Aug 2009, 5:55 AM
  5. Avoid drop menu close on item click
    By cvieira in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 26 Aug 2008, 12:35 AM

Tags for this Thread

Posting Permissions

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