[Lada-commits] [PATCH] Fixed grid selection in searchField in Ortszuordnungsgrid

Wald Commits scm-commit at wald.intevation.org
Wed Feb 8 15:05:38 CET 2017


# HG changeset patch
# User Maximilian Krambach <mkrambach at intevation.de>
# Date 1486562732 -3600
# Node ID e98ec562764f48efe685821d39360a67091dc164
# Parent  b58868c47f0234e9ee02204a63a856453282a2ed
Fixed grid selection in searchField in Ortszuordnungsgrid

diff -r b58868c47f02 -r e98ec562764f app/controller/grid/Ortszuordnung.js
--- 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');


More information about the Lada-commits mailing list