1. #1
    Sencha User
    Join Date
    Feb 2011
    Posts
    15
    Vote Rating
    0
    dosuper is on a distinguished road

      0  

    Default Load a Store in a Radio Button

    Load a Store in a Radio Button


    Hi.
    I have a problem in Ext4 with the radio, i don´t know how can i load a store in a Radio.
    This is the code that i have:
    Code:
      Ext.define('mProteccionExtendida', {
        extend: 'Ext.data.Model',
        fields:[
          { name: 'IdGarantia', mapping: 'IdGarantia', type: 'string' },
          { name: 'DesGarantia', mapping: 'DesGarantia', type: 'string' }
        ]
      });
    
      var sProteccionExtendida = new Ext.data.Store({
        model: 'mProteccionExtendida',
        proxy: {
          type: 'ajax',
          url: 'myurl.php',
          headers: {
            'Accept': 'application/json, text/javascript, *=*',
            'Content-Type': 'application/json; charset=utf-8'
          },
          reader: {
            type: 'json',
            root: 'd'
          },
          autoLoad: true
        }
      });
    
      var fp = Ext.create('Ext.form.Panel', {
        items: [{
          xtype: 'radiogroup',
          fieldLabel: 'Label',
          name: 'redioname',
          ??????
    
      });
    after the ?????? i don't know how to load the store in the radio.

  2. #2
    Sencha User
    Join Date
    Jan 2008
    Posts
    64
    Vote Rating
    0
    ZeusTheTrueGod is on a distinguished road

      0  

    Default


    I will help you with a first step:

    store.on('load', function(){
    //now you know that you store is already filled in with data

    //find a way how to add a radio button for each row in your store yourself!


    });

Thread Participants: 1

Tags for this Thread