I'm not even sure how to search for this, so hopefully this hasn't already been answered a hundred times.

Basically, I have a radio group on my form with three options: Show Completed Exams, Show Incomplete Exams, or Show All Exams.

{
name:           'ShowComplete',
fieldLabel:     'Show',
allowBlank:     true,
columns:        1,
items:          [
                    {
                        name:           'ShowComplete',
                        boxLabel:       'Completed Exams',
                        inputValue:     '1'
                    }, 
                    {
                        name:           'ShowComplete',
                        boxLabel:       'Incomplete Exams',
                        inputValue:     '0'
                    }, 
                    {
                        name:           'ShowComplete',
                        boxLabel:       'All',
                        inputValue:     '-1'
                    }
                ],
xtype:          'radiogroup'
}

When I load the page, I have a nice looking control.

http://dl.dropbox.com/u/298258/extJSRadioGroup.png

However, the only one I can select is Incomplete Exams.

Is there something I am missing? I'm sure it's something simple.

Thanks!

有帮助吗?

解决方案

I had a similar issue. I believe it is related to the fact you're giving the value '0' to your middle item.

Perhaps, due to Javascript's nature, it is afterward wrongly interpreted as 'false' or something like that and causes the behavior of the radio buttons to break.

If you replace the '0' by anything else, it should work.

其他提示

Try taking the name attribute off the RadioGroup... perhaps it is conflicting?

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top