examples/form/nestedcombo.js
[roojs1] / examples / form / nestedcombo.js
index 88299c1..e049603 100644 (file)
@@ -10,7 +10,30 @@ Roo.onReady(function(){
 
     Roo.QuickTips.init();
 
+    var sampledata  = [
+        ['A', 'A states', [
+            ['AK', 'Alaska'],
+            ['AZ', 'Arizona'],
+            ['AR', 'Arkansas']
+                           
+        ]],
+        ['C', 'C states', [        
+          ['CA', 'California'],
+            ['CO', 'Colorado'],
+            ['CT', 'Connecticut']
+        ]],
+        ['D', 'D states', [
+            ['DE', 'Delaware'],
+            ['DC', 'District of Columbia']
+        ]]
+        ['I', 'I states', [
+        
+            ['ID', 'Idaho'],
+            ['IL', 'Illinois'],
+            ['IN', 'Indiana'],
+            ['IA', 'Iowa']
+        ]]
+    ];
     /*
      * ================  Form 2  =======================
      */
@@ -36,13 +59,13 @@ Roo.onReady(function(){
                 store: {
                     xns : Roo.data,
                     xtype : 'SimpleStore',
-                    fields: ['abbr', 'state'],
-                    data : Roo.exampledata.states // from states.js
+                    fields: ['abbr', 'state' , 'cn'],
+                    data : sampledata// from states.js
                    
                 },
                 
                 typeAhead: true,
-                //mode: 'local', // ?? not sure if this should be done
+                mode: 'local',
                 triggerAction: 'all',
                 emptyText:'Select a state...',
                 selectOnFocus:true,