-
25 Dec 2011 8:59 PM #1
Problem with grid using gridviewdragdrop and checkboxmodel
Problem with grid using gridviewdragdrop and checkboxmodel
Ext version tested:
- Ext JS 4.0.7
- IE 9
- FF 8.0.1
- Chrome 16.0
- Can not deselect the checkbox of row.
- check and uncheck row of grid
- check and uncheck row of grid
- check the row, but impossible uncheck
Possible Fix: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>
http://www.sencha.com/forum/showthre...grid-dragdrop&
Operating System:- Win 7
-
26 Dec 2011 8:22 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,684
- Vote Rating
- 435
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.
-
27 Dec 2011 6:39 AM #3
Yes, in version 4.1 beta 1 the error persists
-
26 Jun 2012 12:51 AM #4
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.
-
7 Aug 2012 5:42 AM #5
Still reproducing in 4.1.1 GA, any ETA for fixing this issue?
Thanks,
Puiu
-
31 Jan 2013 12:25 AM #6
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);
}
}
})
-
22 Feb 2013 8:30 PM #7Sencha User
- Join Date
- Oct 2007
- Location
- Katoomba, Blue Mountains, west of Sydney, Australia
- Posts
- 315
- Vote Rating
- 2
@hrliuhai88
Yes, I used the override as described above and it solved the problem for me.
Thanks!
Murray
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.



Reply With Quote