changeset 1365:e98ec562764f

Fixed grid selection in searchField in Ortszuordnungsgrid
author Maximilian Krambach <mkrambach@intevation.de>
date Wed, 08 Feb 2017 15:05:32 +0100
parents b58868c47f02
children 993e542796fd
files app/controller/grid/Ortszuordnung.js
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/app/controller/grid/Ortszuordnung.js	Wed Feb 08 12:53:24 2017 +0100
+++ b/app/controller/grid/Ortszuordnung.js	Wed Feb 08 15:05:32 2017 +0100
@@ -22,8 +22,8 @@
     searchField: null,
 
     /**
-     * Inhitialize the controller
-     * It has 3 listeners
+     * Initialize the controller
+     * It has 10 listeners
      */
     init: function() {
         this.control({
@@ -272,7 +272,8 @@
         win.hide();
         this.searchField.reset();
         var grid = this.searchField.up('panel').down('ortstammdatengrid');
-        grid.getSelectionModel().select(record);
+        var newrecord = grid.store.getById(record.get('id'));
+        grid.getView().getSelectionModel().select(newrecord);
         grid.getView().focusRow(record);
         var verwaltungseinheiten = Ext.data.StoreManager.get('verwaltungseinheiten');
         var staaten = Ext.data.StoreManager.get('staaten');

http://lada.wald.intevation.org