PDA

View Full Version : RadioGroup: findByType inside problem



olgol_g
28 Feb 2013, 4:19 AM
I have the radiogroup with two radiobuttons and textfield,
How can I get numberfiled inside radiogroup. RG has no findByType function?
GR hide all inside


xtype:'radiogroup',
hideLabel: true,
columns: 1 ,
items:[
{
xtype: 'radio', hideLabel: true, name:grName , boxLabel:'All', inputValue: 'All', checked: true, hideLabel: false
},
{
xtype: 'form',
layout: 'hbox',
items:[
{ xtype: 'radio', name:grName, boxLabel:'Only First', inputValue: 'Limited'},
{ xtype: 'numberfield',id: this.title+'num', disabled: true, submitValue : true, allowNegative: false, allowBlank: false, minValue: this.numberPackets_Min, maxValue: this.numberPackets_Max, width: 55, margins: '0 5 0'},
{ xtype: 'label', text:'packets',value: 'packets', helpIcon: 'info',helpDisplay: 'image',helpTitle: 'Info',helpText: infoText}
]
}
]

EPV
28 Feb 2013, 7:13 AM
Why do you have a numberfield in a form in a radiogroup?

In any case, try:



radiogroup.down('numberfield')


Good luck!

olgol_g
1 Mar 2013, 9:19 AM
down (http://docs.sencha.com/ext-js/4-1/#%21/api/Ext.container.AbstractContainer-method-down)( [selector] ) : Available since: Ext 4
I work on 3.4 now
Is any way to solve it in 3.4?

sword-it
2 Mar 2013, 4:11 AM
Hi olgol_g,

Try with find() method -



radiogroup.find('xtype', 'numberfield');


http://docs.sencha.com/ext-js/3-4/#!/api/Ext.Container-method-find

EPV
26 Mar 2013, 2:19 PM
Seems like this is in the wrong forum ...

olgol_g
27 Mar 2013, 9:50 AM
Hi olgol_g,

Try with find() method -



radiogroup.find('xtype', 'numberfield');


http://docs.sencha.com/ext-js/3-4/#!/api/Ext.Container-method-find

There is no find() method here. RadioGroup is not Container