SelectionModel vs Listeners

  1. #1

    SelectionModel vs Listeners

    Hello,

    just wanted to report a simple bug. When using a grid, the Listener embedded within a SelectionModel->CellSelectionModel->Listeners is missing the 4th param on the returned event. See example:

    Grid...

    <SelectionModel>
        <ext:CellSelectionModel>
            <Listeners>
                <CellSelect Fn="cellClick" />
            </Listeners>
        </ext:CellSelectionModel>
    </SelectionModel>
    Event:

    var cellClick = function(grid, rowIndex, columnIndex, e) {
            alert(grid + ',' + rowIndex + ',' + columnIndex + ',' + e);
    }
    Returns: NOTICE: 4th param == undefined
    [object Object],0,7,undefined


    Meanwhile, if you don't embed the listener in a selectionmodel and just use it on the grid.

    <Listeners>
        <CellClick Fn="cellClick" />
    </Listeners>
    Returns
    [object Object],0,7,[object Object]

  2. #2

    RE: SelectionModel vs Listeners

    Hi Juls,

    The two events (CellClick vs CellSelect) pass different arguments to the listener.

    GridPanel.Listeners.CellClick

    http://extjs.com/deploy/dev/docs/?cl...mber=cellclick

    cellclick : ( Grid this, Number rowIndex, Number columnIndex, Ext.EventObject e )
    CellSelectionModel.CellSelect

    http://extjs.com/deploy/dev/docs/?cl...ber=cellselect

    cellselect : ( SelectionModel this, Number rowIndex, Number colIndex )
    Hope this helps.

    Geoffrey McGill
    Founder

Similar Threads

  1. SelectionModel with end row
    By Kai_it in forum 1.x Help
    Replies: 2
    Last Post: Oct 23, 2011, 10:53 AM
  2. SelectionModel Rowselect
    By dreambe in forum 1.x Help
    Replies: 0
    Last Post: Feb 18, 2009, 9:44 AM
  3. How to clean (really) a SelectionModel ?
    By eliezer in forum 1.x Help
    Replies: 4
    Last Post: Feb 06, 2009, 2:08 PM
  4. TreePanel SelectionModel Listeners
    By jchau in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 19, 2008, 3:47 PM
  5. [FIXED] SelectionModel Listeners
    By Timothy in forum Bugs
    Replies: 3
    Last Post: Oct 04, 2008, 12:07 PM

Posting Permissions