diff app/view/grid/FilterResult.js @ 751:704bb359c0fe

dynamically exchange the store of the resultfiltergrid
author Dustin Demuth <dustin@intevation.de>
date Tue, 28 Apr 2015 16:03:59 +0200
parents 7b6467edfdfc
children 4dd0c645ea8b
line wrap: on
line diff
--- a/app/view/grid/FilterResult.js	Tue Apr 28 11:53:39 2015 +0200
+++ b/app/view/grid/FilterResult.js	Tue Apr 28 16:03:59 2015 +0200
@@ -13,7 +13,7 @@
     extend: 'Ext.grid.Panel',
     alias: 'widget.filterresultgrid',
 
-    store: 'ProbenList',
+    store: null, //'ProbenList',
 
     multiSelect: true,
 
@@ -39,17 +39,26 @@
                 icon: 'resources/img/svn-update.png',
                 action: 'export'
             }]
-        }, {
-            xtype: 'pagingtoolbar',
-            dock: 'bottom',
-            store: this.store,
-            displayInfo: true
         }];
         this.columns = [];
         this.callParent(arguments);
     },
 
     /**
+     * This sets the Store of the FilterResultGrid
+     */
+    setStore: function(store){
+        this.removeDocked(Ext.getCmp('ptbar'), true);
+        this.reconfigure(store);
+        this.addDocked([{
+            xtype: 'pagingtoolbar',
+            id: 'ptbar',
+            dock: 'bottom',
+            store: store,
+            displayInfo: true
+        }]);
+    },
+    /**
      * Setup columns of the Grid dynamically based on a list of given cols.
      * The function is called from the {@link Lada.controller.Sql#selectSql
      * select sql event}

http://lada.wald.intevation.org