Results 1 to 4 of 4

Thread: extjs4:2.1(GA) grid cell click return incorrect colIndex if there is hidden column

    You found a bug! We've classified it as EXTJS-10851 . 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
    Jun 2011
    Location
    St. Louis
    Posts
    225

    Default extjs4:2.1(GA) grid cell click return incorrect colIndex if there is hidden column

    To see the problem after load the program:

    (1) Try to click any cell on 'pctChange' column, the colIndex is 1 (it should be 2).

    (2) Try to show 'Price' column, then click any cell on 'pctChange' column, the colIndex is 2 now.

    Just download 4.2.1GA, I have saw a few critical bugs (I will reported once I have test codes). Not sure when we can have stable extjs 4.x.x in order to release our product.


    PHP Code:

    Ext
    .onReady(function() {

        
    Ext.QuickTips.init();

        
    // sample static data for the store
        
    var myData = [
            [
    '3m Co',                               71.720.02,  0.03,  '9/1 12:00am'],
            [
    'Alcoa Inc',                           29.010.42,  1.47,  '9/1 12:00am'],
            [
    'Altria Group Inc',                    83.810.28,  0.34,  '9/1 12:00am'],
            [
    'American Express Company',            52.550.01,  0.02,  '9/1 12:00am'],
            [
    'American International Group, Inc.',  64.130.31,  0.49,  '9/1 12:00am'],
            [
    'Wal-Mart Stores, Inc.',               45.450.73,  1.63,  '9/1 12:00am']
        ];

        
    // create the data store
        
    var store Ext.create('Ext.data.ArrayStore', {
            
    fields: [
               {
    name'company'},
               {
    name'price',      type'float'},
               {
    name'change',     type'float'},
               {
    name'pctChange',  type'float'},
               {
    name'lastChange'type'date'dateFormat'n/j h:ia'}
            ],
            
    datamyData
        
    });

        
    // create the Grid
        
    var grid Ext.create('Ext.grid.Panel', {
        
    layout'fit',
            
    storestore,
            
    columns: [
                {
                    
    text     'Company',
                    
    flex4,
                    
    sortable false,
                    
    dataIndex'company'
                
    },
                {
                    
    text     'Price',
                    
    flex2,
                    
    sortable true,
            
    hiddentrue,
                    
    dataIndex'price'
                
    },
                {
                    
    text     'pctChange',
                    
    flex2,
                    
    sortable true,
                    
    dataIndex'pctChange'
                
    },
                {
                    
    text     'Change',
                    
    flex2,
                    
    sortable true,
                    
    dataIndex'change'
                
    }
            ],
        
    columnLinestrue,
            
    height350,
            
    width600,
            
    title'Array Grid',
            
    renderToExt.getBody(),
            
    listeners: {
                 
    cellDblClick: {
                        
    fn: function(viewtdcellIndexrecordtrrowIndexe){
                     
    console.info' colIndex = ' cellIndex );
                          }
                    }
            }
        });

    }); 

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha Premium Member
    Join Date
    Apr 2013
    Location
    Guildford, United Kingdom
    Posts
    13

    Default

    I know this is an old post, but did you find a solution around this? Just found this one myself recently and could do with a fix!

  4. #4
    Ext JS Premium Member mcouillard's Avatar
    Join Date
    Jun 2008
    Location
    Bucks County, PA
    Posts
    120

    Exclamation still in 4.2.2 - fixed 4.2.3

    Confirmed bug in 4.2.2
    I then applied the 4.2.3 version of the feature and it solved it. No side effects yet, but we're still testing.

    http://docs.sencha.com/extjs/4.2.3/s...ature-Grouping

    I merely added the above to our application so it'd get used after Ext's own. There were many changes between the above file and 4.2.2's version.

Posting Permissions

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