William Troup
William Troup

Reputation: 13131

ExtJS Grid PagingToolbar refresh on store remove

I've setup a ExtJS Grid, while using the PagingToolbar (with PagingMemoryProxy on an ArrayStore).

I have removed items from the store of the grid, but the PagingToolbar will not show that the items have been removed.

Any suggestions on how to do this?

Upvotes: 2

Views: 3681

Answers (1)

Steven de Salas
Steven de Salas

Reputation: 21467

Try unbinding and rebinding the store when you modify the items.

myGrid.store.on('remove', function() {
  var pager = myGrid.getBottomToolbar();
  if (pager) {
    pager.unbind(myGrid.store);
    pager.bind(myGrid.store);
  }
});

Upvotes: 1

Related Questions