View Full Version : issue on row select order change

11 Feb 2012, 9:55 AM
strange thing happening here. See the following method. If i have no rows selected this function works correctly. ie item moves down one place. However if i have a row selected and try and this function i get this error which occurs on the insert.

Uncaught TypeError: Cannot read property 'data' of undefined

function moveSelectedRow() {var grid = Ext.getCmp('processGrid');
var store = grid.getStore();
var index = 1;
var newIndex = 2;
var record = store.getAt(index);
store.insert(newIndex, record);


12 Feb 2012, 7:52 AM
I added this to the array grid example and select 2 items before the select event fires and it works fine for me. The rec that gets moved is unselected but the 2nd rec that isn't moved remains selected:

listeners : {
delay : 2000,
single : true,
select : function(model, rec) {
var store = model.store;

store.insert(4, rec);