0

can anybody tell How to set dynamic inputValue and boxlabel for radio button in radio group in extjs4.1

Thanks

mohan
  • 13,035
  • 29
  • 108
  • 178

1 Answers1

0

Maybe you could use a listener like this example on sencha wiki.

Panel with radio group:

Ext.create('Ext.form.Panel', {
    title: 'RadioGroup Example',
    width: 300,
    height: 125,
    bodyPadding: 10,
    renderTo: Ext.getBody(),
    items:[{
        xtype: 'radiogroup',
        fieldLabel: 'Two Columns',
        // Arrange radio buttons into two columns, distributed vertically
        columns: 2,
        vertical: true,
        items: [
            { boxLabel: 'Item 1', name: 'rb', inputValue: '1',
              listeners: {
                change: function (e, t, eOpts) {
                    ... 
                }
              }
            },
            { boxLabel: 'Item 2', name: 'rb', inputValue: '2' checked: true},
            { boxLabel: 'Item 3', name: 'rb', inputValue: '3' },
            { boxLabel: 'Item 4', name: 'rb', inputValue: '4' },
            { boxLabel: 'Item 5', name: 'rb', inputValue: '5' },
            { boxLabel: 'Item 6', name: 'rb', inputValue: '6' }
        ]
    }]
});

Little example: on stackoverflow

Community
  • 1
  • 1
mfruizs
  • 770
  • 14
  • 20