[flexcoders] Re: RadioButton as DataGrid item editor
--- In flexcoders@yahoogroups.com, Dave Glasser dglas...@... wrote: --- On Fri, 6/25/10, Amy amyblankens...@... wrote: What is your itemRenderer code? I'm just using the RadioButton, out of the box. I'm setting the itemRenderer property on the DataGridColumn to new ClassFactory(RadioButton). I think the radio buttons all need to be in the same place to act as a RadioButtonGroup, so you need to create an itemRenderer that makes a RadioButtonGroup with your three values, then reacts to the change to set the appropriate value to true and the other values to false. HTH; Amy
Re: [flexcoders] Re: RadioButton as DataGrid item editor
Thanks! --- On Sat, 6/26/10, Amy amyblankens...@bellsouth.net wrote: From: Amy amyblankens...@bellsouth.net Subject: [flexcoders] Re: RadioButton as DataGrid item editor To: flexcoders@yahoogroups.com Date: Saturday, June 26, 2010, 9:25 AM --- In flexcoders@yahoogroups.com, Dave Glasser dglas...@... wrote: --- On Fri, 6/25/10, Amy amyblankens...@... wrote: What is your itemRenderer code? I'm just using the RadioButton, out of the box. I'm setting the itemRenderer property on the DataGridColumn to new ClassFactory(RadioButton). I think the radio buttons all need to be in the same place to act as a RadioButtonGroup, so you need to create an itemRenderer that makes a RadioButtonGroup with your three values, then reacts to the change to set the appropriate value to true and the other values to false. HTH; Amy
[flexcoders] Re: RadioButton as DataGrid item editor
--- In flexcoders@yahoogroups.com, Dave Glasser dglas...@... wrote: --- On Thu, 6/24/10, Amy amyblankens...@... wrote: What logic are you using to transfer the value of the RadioButtonGroup to the appropriate properties? None, actually. I would expect the DataGrid to handle that, since it is creating the RadioButtonGroup and my code would not have easy access to it. Plus, I would expect that behavior to be part of the IListItemRenderer contract, which RadioButton implements. If you know a way to make it work, I would be very grateful if would share it. What is your itemRenderer code?
Re: [flexcoders] Re: RadioButton as DataGrid item editor
--- On Fri, 6/25/10, Amy amyblankens...@bellsouth.net wrote: What is your itemRenderer code? I'm just using the RadioButton, out of the box. I'm setting the itemRenderer property on the DataGridColumn to new ClassFactory(RadioButton).
[flexcoders] Re: RadioButton as DataGrid item editor
--- In flexcoders@yahoogroups.com, Dave Glasser dglas...@... wrote: It seems like it should be simple, but it's a nightmare. I'm using Flex 3.3. The items in my dataProvider have a Boolean property. I want only 1 item to have this property set to true, and all others set to false. So I use a RadioButton as the renderer and editor. Although the items initially only have 1 with the property set to true, all of the radio buttons initially appear as false. When I select one, the currently selected one deselects, as you would expect, but the setter on my item is never called. When I use a CheckBox instead of a RadioButton, it works as expected, without the exclusivity. I would be happy if I could get the RadioButton to behave like a checkbox, and implement the exclusivity myself, but that's been an exercise in futility. Is what I'm trying to do possible? Am I missing something? What logic are you using to transfer the value of the RadioButtonGroup to the appropriate properties? Amy
Re: [flexcoders] Re: RadioButton as DataGrid item editor
--- On Thu, 6/24/10, Amy amyblankens...@bellsouth.net wrote: What logic are you using to transfer the value of the RadioButtonGroup to the appropriate properties? None, actually. I would expect the DataGrid to handle that, since it is creating the RadioButtonGroup and my code would not have easy access to it. Plus, I would expect that behavior to be part of the IListItemRenderer contract, which RadioButton implements. If you know a way to make it work, I would be very grateful if would share it.