title: Problem loading extjs radiogroup data
body: <p>How do you load data for a radiogroup in extjs, such that the correct radios are checked?</p>
  
  <p>On the <a href="http://www.extjs.com/deploy/dev/examples/form/check-radio.html" rel="nofollow noreferrer">extjs radio/checkbox example page</a> you will find code like this</p>
  
  <pre><code>{
    xtype: 'radiogroup',
    fieldLabel: 'Auto Layout',
    items: [
         {boxLabel: 'Item 1', name: 'rb-auto', inputValue: 1},
         {boxLabel: 'Item 2', name: 'rb-auto', inputValue: 2, checked: true},
         {boxLabel: 'Item 3', name: 'rb-auto', inputValue: 3},
         {boxLabel: 'Item 4', name: 'rb-auto', inputValue: 4},
         {boxLabel: 'Item 5', name: 'rb-auto', inputValue: 5}
     ]
   }
  </code></pre>
  
  <p>I would expect that doing a form.load() with json like <code>{'rb-auto': 3, …}</code> would mark Item 3 as checked. This doesn't work.
  How could you achieve this effect?</p>
  
  <p><strong>Answer:</strong> (Zach is correct about extjs 3.1) <strong>My expectation is correct, but only since extjs 3.1 is released recently. Also, you need to set the name on boh the individual radio items as the group itself:</strong></p>
  
  <pre><code>{
    xtype: 'radiogroup',
    fieldLabel: 'Auto Layout',
    name: 'rb-auto',
    items: [
         {boxLabel: 'Item 1', name: 'rb-auto', inputValue: 1},
         {boxLabel: 'Item 2', name: 'rb-auto', inputValue: 2, checked: true},
         {boxLabel: 'Item 3', name: 'rb-auto', inputValue: 3},
         {boxLabel: 'Item 4', name: 'rb-auto', inputValue: 4},
         {boxLabel: 'Item 5', name: 'rb-auto', inputValue: 5}
     ]
   }
  </code></pre>