remember after refresh selected row in extjs grid

后端 未结 5 1578
借酒劲吻你
借酒劲吻你 2020-12-17 14:56

I have a problem. I use extjs grid. This grid will be refreshed every seconds.

I refresh with this function:

ND.refresh =          


        
5条回答
  •  猫巷女王i
    2020-12-17 15:19

    i have make modification on this code. If you make selection, and aplys a filter on the store and reload it, the selection model have a first empty array in this selected collection ( at index 0 ).

    This modification is in the last line of the "refreshSelection" function.

    if (newRecordsToSelect.length >= 1){
            this.getSelectionModel().select(newRecordsToSelect);
            Ext.defer(this.setScrollTop, 30, this, [this.getView().scrollState.top]);
        }
    

提交回复
热议问题