You found a bug! We've classified it as EXTJSIV-4878 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User fabio.policeno's Avatar
    Join Date
    Sep 2010
    Location
    Curitiba - PR / Brasil
    Posts
    233
    Vote Rating
    0
    fabio.policeno is on a distinguished road

      0  

    Default Problem with grid using gridviewdragdrop and checkboxmodel

    Problem with grid using gridviewdragdrop and checkboxmodel


    Ext version tested:
    • Ext JS 4.0.7
    Browser versions tested against:
    • IE 9
    • FF 8.0.1
    • Chrome 16.0
    Description:
    • Can not deselect the checkbox of row.
    Steps to reproduce the problem:
    • check and uncheck row of grid
    The result that was expected:
    • check and uncheck row of grid
    The result that occurs instead:
    • check the row, but impossible uncheck
    Test Case:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
        <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
        <script type="text/javascript" src="../../ext-all-debug.js"></script>
    </head>
    <body>
        <script type="text/javascript">
        var store = Ext.create('Ext.data.Store', {
            fields:['name', 'email'],
            data:{
                items:[{ 
                    name: 'Lisa',  
                    email: 'lisa@simpsons.com'
                },{ 
                    name: 'Bart',  
                    email: 'bart@simpsons.com'
                },{ 
                    name: 'Homer', 
                    email: 'home@simpsons.com'
                },{ 
                    name: 'Marge', 
                    email: 'marge@simpsons.com'
                }]
            },
            proxy: {
                type: 'memory',
                reader: {
                    type: 'json',
                    root: 'items'
                }
            }
        });
        
        Ext.define('MyGrid', {
            extend: 'Ext.grid.Panel',
            alias: 'widget.mygrid',
            selType: 'checkboxmodel',
            selModel: {mode: 'MULTI'},
            store: store,
            flex: 1,
            columns: [{ 
                header: 'Name',  
                dataIndex: 'name' 
            },{ 
                header: 'Email', 
                dataIndex: 'email'
            }]
        })
        
        Ext.create('Ext.panel.Panel', {
            renderTo: Ext.getBody(),
            layout: 'hbox',
            items:[{
                xtype: 'mygrid',
                viewConfig: {
                    plugins: {
                        ptype: 'gridviewdragdrop',
                        dragGroup: 'listleft',
                        dropGroup: 'listright'
                    }
                }
            },{
                xtype: 'mygrid',
                viewConfig: {
                    plugins: {
                        ptype: 'gridviewdragdrop',
                        dragGroup: 'listright',
                        dropGroup: 'listleft'
                    }
                }
            }]
        });
        </script>
    </body>
    </html>
    Possible Fix:
    http://www.sencha.com/forum/showthre...grid-dragdrop&

    Operating System:
    • Win 7

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,684
    Vote Rating
    435
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    This seems to be present in 4.1.0 beta 1 also
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

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

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

  3. #3
    Sencha User fabio.policeno's Avatar
    Join Date
    Sep 2010
    Location
    Curitiba - PR / Brasil
    Posts
    233
    Vote Rating
    0
    fabio.policeno is on a distinguished road

      0  

    Default


    Yes, in version 4.1 beta 1 the error persists

  4. #4
    Sencha User
    Join Date
    Feb 2012
    Posts
    3
    Vote Rating
    0
    januzis is on a distinguished road

      0  

    Default


    No need for checkbox selection, simple multi selection is affected also. E.g. if I have multi selection on a non-dnd grid, and click one of the selected rows, all other selected rows deselect. With dnd grid nothing happens. Not a big deal, but it bugs me when I have dnd and non-dnd grids in an application, and behavior is inconsistent.

  5. #5
    Sencha Premium Member
    Join Date
    Nov 2007
    Location
    Bucharest, Romania
    Posts
    14
    Vote Rating
    0
    puya is on a distinguished road

      0  

    Default


    Still reproducing in 4.1.1 GA, any ETA for fixing this issue?

    Thanks,
    Puiu

  6. #6
    Sencha User
    Join Date
    Jul 2008
    Posts
    3
    Vote Rating
    0
    hrliuhai88 is on a distinguished road

      0  

    Default


    I think the selection model and dd conficted in event handling.but I cannot find a correct place to correct it. At last I modify 'itemmousedown' to 'itemclick' in the selection model's bindComponent mothed. The probelm resolved,though not perfect.

    Ext.override(Ext.selection.RowModel,{


    bindComponent: function(view) {
    var me = this;


    me.views = me.views || [];
    me.views.push(view);
    me.bindStore(view.getStore(), true);


    view.on({
    itemclick: me.onRowMouseDown,
    scope: me
    });


    if (me.enableKeyNav) {
    me.initKeyNav(view);
    }
    }
    })

  7. #7
    Sencha User murrah's Avatar
    Join Date
    Oct 2007
    Location
    Katoomba, Blue Mountains, west of Sydney, Australia
    Posts
    315
    Vote Rating
    2
    murrah is on a distinguished road

      0  

    Default


    @hrliuhai88

    Yes, I used the override as described above and it solved the problem for me.

    Thanks!

    Murray