X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..6a7e4474cba9d8be4b2ec445e10f1691f7277c50:/examples/form/form-grid.js diff --git a/examples/form/form-grid.js b/examples/form/form-grid.js index 0d6aaf36..0d2fe7df 100644 --- a/examples/form/form-grid.js +++ b/examples/form/form-grid.js @@ -1,6 +1,6 @@ /*! - * Ext JS Library 3.0.0 - * Copyright(c) 2006-2009 Ext JS, LLC + * Ext JS Library 3.2.0 + * Copyright(c) 2006-2010 Ext JS, Inc. * licensing@extjs.com * http://www.extjs.com/license */ @@ -140,10 +140,9 @@ Ext.onReady(function(){ title:'Company Data', border: true, listeners: { - render: function(g) { + viewready: function(g) { g.getSelectionModel().selectRow(0); - }, - delay: 10 // Allow rows to be rendered. + } // Allow rows to be rendered. } } },{ @@ -174,55 +173,24 @@ Ext.onReady(function(){ fieldLabel: 'Last Updated', name: 'lastChange' }, { - xtype: 'panel', - layout: 'table', - layoutConfig: { - columns: 4 - }, - anchor: '100%', - defaults: { - border: false, - layout: 'form', - labelWidth: 15, - style: { - paddingRight: '10px' - } - }, - + xtype: 'radiogroup', + columns: 'auto', + fieldLabel: 'Rating', + name: 'rating', // A radio group: A setValue on any of the following 'radio' inputs using the numeric // 'rating' field checks the radio instance which has the matching inputValue. items: [{ - cellCls: 'x-form-item', - xtype: 'label', - text: 'Rating', - width: 98 + inputValue: '0', + boxLabel: 'A' }, { - items: { - xtype: 'radio', - name: 'rating', - inputValue: '0', - fieldLabel: 'A' - } + inputValue: '1', + boxLabel: 'B' }, { - items: { - xtype: 'radio', - name: 'rating', - inputValue: '1', - fieldLabel: 'B' - } - }, { - items: { - xtype: 'radio', - name: 'rating', - inputValue: '2', - fieldLabel: 'C' - } + inputValue: '2', + boxLabel: 'C' }] }] }], renderTo: bd }); - - // Create Panel view code. Ignore. - createCodePanel('form-grid.js', 'View code to create this Form'); }); \ No newline at end of file