-
7 Feb 2012 11:32 PM #1
[4.1 Beta 2] Selection is disabled in grid, when store loads from remote.
[4.1 Beta 2] Selection is disabled in grid, when store loads from remote.
BUG: Selection is disabled in grid, when store loads from remote with autoLoad set to false.
if autoLoad set to true, it works. The row can be selected with CheckboxModel
and the test.json list following:Code:Ext.define('User', { extend: 'Ext.data.Model', fields: [ {name: 'firstName', type: 'string'}, {name: 'lastName', type: 'string'}, {name: 'email', type: 'string'} ] }); var store = Ext.create('Ext.data.Store', { model: 'User', proxy: { type: 'ajax', url: 'test.json', reader: { type: 'json', root: 'rows' } }, autoLoad: false }); store.load(); var grid = Ext.create('Ext.grid.Panel',{ store: store, selModel: Ext.create('Ext.selection.CheckboxModel'), viewConfig : { forceFit : true }, columns:[ { text: "First Name", dataIndex: 'firstName', width: 100, hideable: false, scope: me },{ text: "Last Name", dataIndex: 'lastName', width: 80, hideable: false, scope: me },{ text: "Email", width: 40, dataIndex: 'email', scope: me }] });
Code:{ "count":2, "rows":[{"firstName":"Aaron1","lastName":"Conran","email":"ttt@sdu.edu.cn"}, {"firstName":"root","lastName":"Spencer","email":"xxxx@sdu.edu.cn"}], "success":true }
-
7 Feb 2012 11:36 PM #2
Can't reproduce this using your example. You'll need to provide more info.
Code:Ext.define('User', { extend: 'Ext.data.Model', fields: [{ name: 'firstName', type: 'string' }, { name: 'lastName', type: 'string' }, { name: 'email', type: 'string' }] }); Ext.onReady(function() { var store = Ext.create('Ext.data.Store', { model: 'User', proxy: { type: 'ajax', url: 'data.json', reader: { type: 'json', root: 'rows' } } }); store.load(); var grid = Ext.create('Ext.grid.Panel', { renderTo: Ext.getBody(), store: store, selModel: Ext.create('Ext.selection.CheckboxModel'), viewConfig: { forceFit: true }, columns: [{ text: "First Name", dataIndex: 'firstName', width: 100 }, { text: "Last Name", dataIndex: 'lastName', width: 80 }, { text: "Email", width: 40, dataIndex: 'email' }] }); }); // Server { "count": 2, "rows": [ { "firstName": "Aaron1", "lastName": "Conran", "email": "ttt@sdu.edu.cn" }, { "firstName": "root", "lastName": "Spencer", "email": "xxxx@sdu.edu.cn" } ], "success": true }Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
7 Feb 2012 11:47 PM #3
Thx for your reply
The grid will works, but the checkbox cannot be checked.
-
8 Feb 2012 12:03 AM #4
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
21 Feb 2012 8:11 PM #5
me, too.
checkbox cannot be checked.
xtype: window
animateTarget: not null
Ver. Ext JS 4.1.0 beta 2a
but, animateTarget: null
checkbox can be checked.



Reply With Quote