[Lada-commits] [PATCH 4 of 4] A draft on how the Nuklide could be selected... maybe this path can be used

Wald Commits scm-commit at wald.intevation.org
Fri May 8 16:12:34 CEST 2015


# HG changeset patch
# User Dustin Demuth <dustin at intevation.de>
# Date 1431094321 -7200
# Node ID 62721a75d31db247a7e8944c276d29637b4deaff
# Parent  ba8c0e754979ff6b4bb0cf640aa2b339259a8b70
A draft on how the Nuklide could be selected... maybe this path can be used

diff -r ba8c0e754979 -r 62721a75d31d app/controller/grid/Messmethode.js
--- a/app/controller/grid/Messmethode.js	Fri May 08 15:31:58 2015 +0200
+++ b/app/controller/grid/Messmethode.js	Fri May 08 16:12:01 2015 +0200
@@ -88,7 +88,19 @@
         if (!store) {
             store = Ext.create('Lada.store.Messgroessen');
         }
+        //get selection model
+        var selectedRecords = [];
+        //iterate store and slecet all records which are in nuklide array
+        store.each(function(record){
+            //TODO if(record.get('id') in nuklide){
+                selectedRecords.push(record);
+            //TODO}
+        });
         ngrid.setData(store);
+
+        var selModel = ngrid.getSelectionModel();
+        console.log(selModel);
+        selModel.select(selectedRecords, false, false);
     },
 
     /**


More information about the Lada-commits mailing list