Results 1 to 2 of 2

Thread: [4.0.7] 'select' event is fired when a grid is sorted if selection model is CellModel

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Jul 2011
    Vote Rating

    Default [4.0.7] 'select' event is fired when a grid is sorted if selection model is CellModel

    The simplest use case to reproduce this bug is the following:

    I just edited the example in the Ext.grid.Panel doc, in basic gridPanel live preview. Below is the edited code:

    Ext.create('', {
        fields:['name', 'email', 'phone'],
            { 'name': 'Lisa',  "email":"",  "phone":"555-111-1224"  },
            { 'name': 'Bart',  "email":"",  "phone":"555-222-1234" },
            { 'name': 'Homer', "email":"",  "phone":"555-222-1244"  },
            { 'name': 'Marge', "email":"", "phone":"555-222-1254"  }
        proxy: {
            type: 'memory',
            reader: {
                type: 'json',
                root: 'items'
    Ext.create('Ext.grid.Panel', {
        title: 'Simpsons',
        columns: [
            { header: 'Name',  dataIndex: 'name' },
            { header: 'Email', dataIndex: 'email', flex: 1 },
            { header: 'Phone', dataIndex: 'phone' }
        height: 200,
        width: 400,
        renderTo: Ext.getBody(),
            'select':function(cell, rec, row, col) {
                alert('cell at position ' + row + ' | ' + col + ' was selected');
    So the only changes I made are:
    - added selType: 'cellmodel' to grid config
    - added a select listener that will show a pop-up with the selected cell coordinates when the select event is fired.

    Expected behaviour:
    - the alert pop-up should be showed only when a cell is clicked/selected

    Actual behaviour:
    - if a cell was clicked, pressing on one of the table headers to sort the data will trigger the select event and the pop-up will be displayed. Example: click on the first cell: a pop-up with 'cell at position 0 | 0 was selected' will be showed. Then click on 'Email' header to sort the grid, and again the same pop-up will be showed. After that the cell is deselected.

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL
    Vote Rating


    This example seems to be working fine in 4.1.0.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2

    Think my support is good? Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Posting Permissions

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