Anthony.Hall
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.remove(record);
store.insert(newIndex, record);
}
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.remove(record);
store.insert(newIndex, record);
}