Extjs Radio Group: Can only click on one item
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?
精彩评论