Results 1 to 8 of 8

Thread: Get grid component that fires a selectionmodel select event

  1. #1
    Sencha Premium User filippo.ferrari's Avatar
    Join Date
    Apr 2010
    Location
    Sanremo - Italy
    Posts
    135
    Answers
    2

    Default Get grid component that fires a selectionmodel select event

    Hallo,


    I've to do something on row select on a grid panel.
    select event parameters are:


    - this (the selection model not the grid),
    - record,
    - index,
    - eOpts


    How to refer to the grid?

  2. #2
    Sencha User
    Join Date
    May 2013
    Posts
    18
    Answers
    1

    Default

    Hy try eOpts.scope

  3. #3
    Sencha Premium User filippo.ferrari's Avatar
    Join Date
    Apr 2010
    Location
    Sanremo - Italy
    Posts
    135
    Answers
    2

    Default

    eopts is present in documentation but:TypeError: eOpts is undefinedconsole.log(eOpts.scope);in Firebug Why???

  4. #4
    Sencha User
    Join Date
    May 2013
    Posts
    18
    Answers
    1

    Default

    try like this

    {
    xtype: 'gridpanel',
    ...
    listeners: {
    select: function (model, record, i) {
    grid = this;
    }
    }

    }

  5. #5
    Sencha Premium User filippo.ferrari's Avatar
    Join Date
    Apr 2010
    Location
    Sanremo - Italy
    Posts
    135
    Answers
    2

    Default

    ... and then?

  6. #6
    Sencha User
    Join Date
    May 2013
    Posts
    18
    Answers
    1

    Default

    ...

    grid = this;


    ...

  7. #7
    Sencha Premium User filippo.ferrari's Avatar
    Join Date
    Apr 2010
    Location
    Sanremo - Italy
    Posts
    135
    Answers
    2

    Default

    I'm using a MVC architecture... this is not the grid but the controller....

  8. #8
    Sencha User
    Join Date
    May 2013
    Posts
    18
    Answers
    1

    Default

    You cane make refs in your controller

    Ext.define('MyApp.controller.MyController', {
    extend: 'Ext.app.Controller',


    refs: [
    {
    ref: 'MyRef',
    selector: 'grid[id=My_id]'
    },

    and then

    grid = this.getMyRef()

Posting Permissions

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