Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User j-joey's Avatar
    Join Date
    Apr 2008
    Location
    Mersin, Turkey
    Posts
    186
    Vote Rating
    0
    j-joey is on a distinguished road

      0  

    Default [FIXED] Selection Model Binding Problem When Using Multiple Grids

    [FIXED] Selection Model Binding Problem When Using Multiple Grids


    Hi,

    There is a selModel binding problem when you have more than one grid in one root component. Problem occurs when first grid has no selModel specified but others has. In design time everthing seems ok. But when previewing rendering process is broken.

    In the exported code selModel is defined in the right grid, but selModel is bound to first grid. If you bind a selModel to first grid too, everything works OK.

    how to reproduce?
    - add a panel,
    - set a layout
    - add 2 grids, (you can also duplicate the first one)
    - set autoRefs
    - bind a selModel (checkbox) to second grid
    - preview

    rendering is broken...

    an exported code to show wrong binding:
    PHP Code:
    MyPanelUi Ext.extend(Ext.Panel, {
        
    title'My Panel',
        
    width919,
        
    height569,
        
    layout'border',
        
    initComponent: function() {
            
    this.items = [
                {
                    
    xtype'grid',
                    
    title'My Grid',
                    
    region'center',
                    
    ref'first',
                    
    columns: [
                        {
                            
    xtype'gridcolumn',
                            
    dataIndex'string',
                            
    header'Column',
                            
    sortabletrue,
                            
    width100
                        
    }
                    ]
                },
                {
                    
    xtype'grid',
                    
    title'My Grid',
                    
    region'east',
                    
    width372,
                    
    ref'second',
                    
    selModel: new Ext.grid.CheckboxSelectionModel({

                    }),
                    
    columns: [
                        {
                            
    xtype'gridcolumn',
                            
    dataIndex'string',
                            
    header'Column',
                            
    sortabletrue,
                            
    width100
                        
    }
                    ]
                }
            ];
            
    MyPanelUi.superclass.initComponent.call(this);
            
    this.first.colModel.config.unshift(this.first.selModel);
        }
    }); 
    as you can see first grid's selModel is being bound to first colModel.

  2. #2
    Sencha - Desktop Packager Dev Team jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747
    Vote Rating
    7
    jarrednicholls will become famous soon enough jarrednicholls will become famous soon enough

      0  

    Default


    Thanks for reporting this!

  3. #3
    Ext JS Premium Member
    Join Date
    Mar 2011
    Posts
    69
    Vote Rating
    0
    scancubus is on a distinguished road

      0  

    Default


    Hi!,

    Is there a fix for this? I am having similar problem. If you create two grids from same xtype, then use checkboxselection model, it works ok with one grid, but when you switch to the tab that the second grid is in, there are now 2 columns of checkboxes...

  4. #4
    Sencha User
    Join Date
    Jun 2011
    Posts
    8
    Vote Rating
    0
    ahmsal1984 is on a distinguished road

      0  

    Default Solution?

    Solution?


    Quote Originally Posted by scancubus View Post
    Hi!,

    Is there a fix for this? I am having similar problem. If you create two grids from same xtype, then use checkboxselection model, it works ok with one grid, but when you switch to the tab that the second grid is in, there are now 2 columns of checkboxes...
    Hi,

    Did you find a solution? I am using ext js 4.0.7 and getting the same error.

    Thanks

  5. #5
    Sencha User
    Join Date
    Jun 2011
    Posts
    8
    Vote Rating
    0
    vinayakpanse is on a distinguished road

      0  

    Default I have same issue with 3 grids in one container

    I have same issue with 3 grids in one container


    I have three grids in one container , first time when you load the page it shows the data in first grid but to see the data in 2nd and 3rd grid I have to click 2 and 3rd tab then I can see the data, Also I noticed that only two rows get selected .

  6. #6
    Sencha User
    Join Date
    May 2010
    Posts
    1
    Vote Rating
    0
    quangmd is on a distinguished road

      0  

    Default what is FIXED ??

    what is FIXED ??


    Can anybody show more clear on how to fix ? I am facing this problem too

Similar Threads

  1. Multiple Cells Selection Model
    By kpopov in forum Ext 2.x: Help & Discussion
    Replies: 7
    Last Post: 28 Feb 2014, 1:45 AM
  2. Replies: 1
    Last Post: 28 Aug 2008, 7:53 AM

Thread Participants: 5