You found a bug! We've classified it as a bug in our system. We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Ext JS Premium Member
    Join Date
    Mar 2011
    Posts
    55
    Vote Rating
    1
    JPfahl is on a distinguished road

      0  

    Default [OPEN-EXTJSIV-1812]beforeselect event on grid panel does not fire.

    [OPEN-EXTJSIV-1812]beforeselect event on grid panel does not fire.


    The beforeselect event on the grid panel does not fire.

  2. #2
    Sencha Premium Member harrydeluxe's Avatar
    Join Date
    Jul 2007
    Location
    Nürnberg, Germany
    Posts
    78
    Vote Rating
    29
    harrydeluxe has a spectacular aura about harrydeluxe has a spectacular aura about

      0  

    Default


    bring forward.
    DELACAP | Github
    "don't code today what you can't debug tomorrow"

  3. #3
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,114
    Vote Rating
    30
    tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about

      0  

    Default


    Is there a workaround for this? A missing beforeselect event is blocking my migration to ExtJs 4.

    Terence

  4. #4
    Sencha Premium Member harrydeluxe's Avatar
    Join Date
    Jul 2007
    Location
    Nürnberg, Germany
    Posts
    78
    Vote Rating
    29
    harrydeluxe has a spectacular aura about harrydeluxe has a spectacular aura about

      0  

    Default


    PHP Code:
    Ext.override(Ext.selection.RowModel,  
        { 
        
    // Allow the GridView to update the UI by 
            // adding/removing a CSS class from the row. 
            
    onSelectChange: function(recordisSelectedsuppressEvent) { 

                var 
    me      this
                    
    views   me.views
                    
    viewsLn views.length
                    
    store   me.store
                    
    rowIdx  store.indexOf(record), 
                    
    0
                    
    allowSelect true
                  
                for (; 
    viewsLni++) { 
                    if (
    isSelected) { 
                         
                        
    allowSelect me.fireEvent('beforeselect'merecordrowIdx) !== false
                         
                        if (
    allowSelect) { 
                            
    views[i].onRowSelect(rowIdxsuppressEvent); 
                            if (!
    suppressEvent) { 
                                
    me.fireEvent('select'merecordrowIdx); 
                            } 
                        } 
                         
                    } else { 
                        
    views[i].onRowDeselect(rowIdxsuppressEvent); 
                        if (!
    suppressEvent) { 
                            
    me.fireEvent('deselect'merecordrowIdx); 
                        } 
                    } 
                } 
            }     
        }); 
    This workaround prevented only a visual select.
    DELACAP | Github
    "don't code today what you can't debug tomorrow"

  5. #5
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,114
    Vote Rating
    30
    tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about

      0  

    Default


    I need a full working beforeselect. I also wonder why this event in no longer part of the RowSelectionModel. It's in the grid view.

    beforeselect, select and after select must be implemented somehow. A row select changes the information state in an application. I use beforeselect for validation if any record on the screen is in edit mode. Then you get a pop up etcera....

    I am really amazed that this isn't a blocking issue for other programmers. This migration to ExtJs 4 is getting me on my nerves....

  6. #6
    Sencha Premium Member harrydeluxe's Avatar
    Join Date
    Jul 2007
    Location
    Nürnberg, Germany
    Posts
    78
    Vote Rating
    29
    harrydeluxe has a spectacular aura about harrydeluxe has a spectacular aura about

      0  

    Default


    I feel the same.
    DELACAP | Github
    "don't code today what you can't debug tomorrow"

  7. #7
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    9
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    This is on top of the priority list for 4.0.2
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  8. #8
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,354
    Vote Rating
    134
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all

      0  

    Default


    The fix has been merged in to 4.0.2. There is also a beforedeselect event that can be used to prevent the selection from leaving a row. These events apply to grid and dataview as well.
    Don Griffin
    Ext JS Development Team Lead

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  9. #9
    Ext JS Premium Member
    Join Date
    Dec 2010
    Location
    Hamburg, Germany
    Posts
    195
    Vote Rating
    7
    winkelmann will become famous soon enough

      0  

    Default


    It appears this is still not fixed in 4.1.2 ...

Similar Threads

  1. [FIXED] DataView.beforeselect event is never actually fired
    By jep in forum Sencha Touch 1.x: Bugs
    Replies: 7
    Last Post: 20 Sep 2011, 8:09 AM
  2. Replies: 1
    Last Post: 15 Apr 2011, 1:26 AM
  3. Replies: 4
    Last Post: 11 Apr 2011, 7:34 PM
  4. Replies: 0
    Last Post: 21 Mar 2011, 5:56 AM

Thread Participants: 5