PDA

View Full Version : Highlighting current cell, after store.reload()



softm
5 Nov 2011, 1:30 PM
I have grid, there i make some actions on 'afteredit' event of grid. Basicly - i need reload store, - to sync grid.
Now - is a probelm, - how to restore cell position, - i.e. not start again editing, just move selection to current cell?

Here is code:

//make - entered - to be an index
if ( e.field == "ste_adj" )
{
var val = make_idx ( e.value );
e.record.set( e.field, val );
e.record.commit();

setTimeout(function(){
store.reload();
HERE is want restore HIGHLIGHT cell position ...


}, 500);

}

mitchellsimoens
18 Nov 2011, 11:56 AM
You need to capture the selected cell (getSelectedCell() on the selection model may help) before store reload and then select() on the selection model to select that cell.