1. #81
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,625
    Vote Rating
    331
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    @mikih. Try stopping the mousedown event rather than the click event.

  2. #82
    Ext JS Premium Member
    Join Date
    Aug 2010
    Posts
    52
    Vote Rating
    2
    mikih is on a distinguished road

      0  

    Default


    Hi Skirtle,

    thanks for your quick response! There is no mousedown event on the button... and on the grid it doesn't get fired

    button only has mouseout, mouseover events


    Cheers

    Florian

  3. #83
    Ext JS Premium Member
    Join Date
    Aug 2010
    Posts
    52
    Vote Rating
    2
    mikih is on a distinguished road

      0  

    Default


    there is only a itemmousedown which is actually of type mousedown but stopPropagation() or even stopEvent() wont stop it from selecting it.

    I also tried to stop the select event itself...


    But as I understand it I need to stop the mousedown event from the button inside from bubbling up the stack?

  4. #84
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,625
    Vote Rating
    331
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    You need to stop the mousedown event on the button's element.

  5. #85
    Ext JS Premium Member
    Join Date
    Aug 2010
    Posts
    52
    Vote Rating
    2
    mikih is on a distinguished road

      0  

    Default


    there is a bug in the Button class:

    Code:
    // @private
        onMouseDown: function(e) {
            var me = this;
            if (!me.disabled && e.button === 0) {
                me.addClsWithUI(me.pressedCls);
                me.doc.on('mouseup', me.onMouseUp, me);
            }
        },


    EDIT:
    there wasnt a bug: I was irretated seeing the mouseup string in there

  6. #86
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,625
    Vote Rating
    331
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    It looks correct to me.

  7. #87
    Ext JS Premium Member
    Join Date
    Aug 2010
    Posts
    52
    Vote Rating
    2
    mikih is on a distinguished road

      0  

    Default


    sorry I have been confused

    I added an override to the Button class to fire the mousedown event... Got it working now

    Code:
    // @override
        onMouseDown: function(e) {
            var me = this;
            if (!me.disabled && e.button === 0) {
                me.addClsWithUI(me.pressedCls);
                me.doc.on('mouseup', me.onMouseUp, me);
    
    
                // add fire event
                me.fireEvent('mousedown', e, me);
            }
        },

    and then in my controller I stop the event.

    Code:
    ...
    mousedown: function(e) {
    	e.stopPropagation();
    }
    ...

    Thanks a lot

    Florian

  8. #88
    Sencha User
    Join Date
    Sep 2011
    Posts
    8
    Vote Rating
    0
    Tifanix is on a distinguished road

      0  

    Default HELP

    HELP


    Hey, I was trying to test the component in grid, but I get the error "too much recursion".
    Can you help me out a little with this?... i try to put this (like in your example) inside one of my colums:

    {text: 'Nivel 1',dataIndex: 'status', xtype: 'componentcolumn',
    renderer: function(status) {
    return {
    store: ['Available', 'Away', 'Busy', 'Offline'],
    value: status,
    xtype: 'combobox'
    };
    }
    },

    ....Also, what i really need is to put a grid (with only one colum) inside each of the"big" grid's cells.... i think it may work just like this example but with grid instead of combobox.... am I too far from it???....
    Thanks

  9. #89
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,625
    Vote Rating
    331
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    Quote Originally Posted by Tifanix View Post
    Hey, I was trying to test the component in grid, but I get the error "too much recursion".
    You'll find this answered earlier in the thread.

    Quote Originally Posted by Tifanix View Post
    Also, what i really need is to put a grid (with only one colum) inside each of the"big" grid's cells....
    You should be able to include a grid but it's possible the outer grid and inner grid could clash. CSS and event listeners are obvious potential pain points but whatever the problems may be they should be solvable with a bit of tweaking. You'd have the same problems no matter how you included the nested grids.

    However, if you only need 1 column then you may want to consider not using a grid at all. A dataview or a boundlist are two possible alternatives.

  10. #90
    Sencha User
    Join Date
    Sep 2011
    Posts
    8
    Vote Rating
    0
    Tifanix is on a distinguished road

      0  

    Default


    Thanks for the quick response skirtle! I'll try a different approach not using grids and see how it goes..
    Thanks again