Uncommited changes synced
[roojs1] / Roo / bootstrap / Table / RowSelectionModel.js
index 7502ccb..ee342da 100644 (file)
@@ -110,6 +110,9 @@ Roo.extend(Roo.bootstrap.Table.RowSelectionModel, Roo.bootstrap.Table.AbstractSe
             },
             scope: this
         });
+        this.grid.store.on('load', function(){
+            this.selections.clear();
+        },this);
         /*
         var view = this.grid.view;
         view.on("refresh", this.onRefresh, this);
@@ -306,7 +309,7 @@ Roo.extend(Roo.bootstrap.Table.RowSelectionModel, Roo.bootstrap.Table.AbstractSe
     
         }else{
             var isSelected = this.isSelected(rowIndex);
-            Roo.log("select row:" + rowIndex)
+            //Roo.log("select row:" + rowIndex);
             if(isSelected){
                 this.deselectRow(rowIndex);
             } else {
@@ -437,7 +440,10 @@ Roo.extend(Roo.bootstrap.Table.RowSelectionModel, Roo.bootstrap.Table.AbstractSe
         }
        
         var r = this.grid.store.getAt(index);
-        //var r = this.grid.dataSource.getAt(index);
+        if (!r) {
+            return;
+        }
+        
         this.selections.remove(r);
         //.console.log('deselectRow - record id :' + r.id);
         if(!preventViewNotify){