I am using Dojo EnhancedGrid and would like to set an item selected after calling XSP.partialRefreshPost or XSP.partialRefreshGet
var store = dataGrid.store;
index = grid.selection.selectedIndex;
var item = dataGrid.getItem(index);
var id = store.getValue(item, "@unid");
var remoteMethod = myRPC.sortGridPosition(index + 'DOWN');
remoteMethod.addCallback(function(response){
// handle whatever came back from the server
XSP.partialRefreshPost("#{id:gridDiv}",{
onComplete: function () {
grid.selection.setSelected(response, true);
grid.selection.setSelected(parseInt(index), false);
}
});
});
but i keep geting the error cannot find focusView of undefined, how can i set index selected after XSP.partialRefreshPost?