Reputation: 1
I have a grid with 2 rows, when removing the first row from the store the grid updates and looks as expected. But the old selection is still active with data that should not exist anymore.
When doubleclicking (the new first row) in the grid, it opens the old data.
After updating the store I have tried:
grid.getSelectionModel().select(0);
grid.getSelectionModel().deselectAll();
grid.getSelectionModel().clearSelections();
This is ExtJS version 6.5, classic
Upvotes: 0
Views: 177
Reputation: 260
you can use bind in grid. like
Ext.create('Ext.panel.Grid',{
bind:{
selection: '{selection}'
},
.....codes })
Ext.create('Ext.app.ViewModel',{
alias: 'viewmodel.aliasname',
data:{selection: null}})
now update or reload store selection is null.
Upvotes: 0