thx, Condor, but after moving and then save changes (editorgrid) I see a row duplicates, how to fix it, I cann`t imaginate
sorry) already fix
PHP Code:
var purgeFromRemoved = App.in_array(record,this.store.removed) ? false : true;
this.store.remove(record);
this.store.insert(index, record);
// purge record from removed
if(purgeFromRemoved){
var i = this.store.removed.indexOf(record);
if(i != -1) this.store.removed.splice(i,1);
}
Hi,
I am a beginner in ext js. i am using Ext.NET.
I am not sure howw to make this work for me.
Can anyone help?
Regads
Jophin
I was working on problem like this and thought I'd mention a little shortcut I found. In our code we have to move one or multiple rows at once but we only have to move then by one position at a time. I found that it was easier to move one row "out of the way" instead of moving each row in the selected group.
For example, assuming a grid with 7 rows and the user wants to move rows 2, 3 and 4 down by one position. Instead of looping through the selected group of rows and moving them one at a time, you can move row 5 to position 2 and get the same effect as moving the selected group of rows.
I am getting error saying getSelected() method is not present. What changes to be done in this code to move grid's row up and down working?
var record = grid.getSelectionModel().getSelected();
if (!record) {
return;
}
var index = grid.getStore().indexOf(record);
if (direction < 0) {
index--;
if (index < 0) {
return;
}
} else {
index++;
if (index >= grid.getStore().getCount()) {
return;
}
}
grid.getStore().remove(record);
grid.getStore().insert(index, record);
grid.getSelectionModel().selectRow(index, true);
hi,
how can I revert it to same position after moving up and/or down. I have another button revert.