It is more of a document-scope issue. Each MXML file is its own
document and radio button groups are per-document so each row is a
document with one radio button in the group.
You might have better luck using an ASComponent subclass of
RadioButton as the cellRenderer. Create a .as file that looks sort
of like:
class RadioButtonCellRenderer extends RadioButton
{
function setValue()
{
}
function init()
{
groupName = "DGRadioGroup"
}
}
--- In [email protected], "Kent Henneuse" <[EMAIL PROTECTED]>
wrote:
> Nope. Bummer. I was hoping. I can still select multiple radio
buttons
> even with the flag set to false. What I want is very similar to the
> checkbox cell renderer that comes with the Flex Samples Explorer
but think
> of it as only one user can be active at a time. Hence the use of a
radio
> button.
>
>
>
> I have thought of writing a bunch of ActionScript to make sure that
only one
> radio button is selected and unselect the others but this seems
like a hack
> for something that is probably common.
>
>
>
> Thanks,
>
>
>
> -Kent
>
>
>
> _____
>
> From: [email protected]
[mailto:[EMAIL PROTECTED] On
> Behalf Of dave buhler
> Sent: Monday, June 13, 2005 8:01 AM
> To: [email protected]
> Subject: Re: [flexcoders] RadioButton in a DataGrid
>
>
>
> Try setting multipleSelection to false.
>
> <mx:DataGrid
> multipleSelection="false">
>
> </mx:DataGrid>
>
> On 6/13/05, Kent Henneuse <[EMAIL PROTECTED]> wrote:
>
> Flexcoders,
> I am trying to put a single radio button on each row of a
datagrid so
> that I can use it as a selection for the next piece of a workflow.
So far I
> have it displaying correctly by using a cellRenderer that is
below. The
> problem is that I can select more then one of the radio buttons at
a time so
> they are not mutually exclusive. Has anybody done this sort of
thing
> before? Is there a better way to do this or am I just missing some
piece of
>
> magic to make it work?
>
> I did also try to put a RadioButtonGroup on the DataGrid but it
seems to get
> ignored in the cellRenderer. My guess is that there is a
namespacing issue.
>
> Thanks,
>
> -Kent
>
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:HBox xmlns:mx="http://www.macromedia.com/2003/mxml">
> <mx:Script>
> var labelData:String;
>
> function setValue(str:String, item:Object) {
> if (item == undefined)
> {
> return;
> }
> labelData = String(item.Employee );
> }
> </mx:Script>
>
> <mx:RadioButton id="Flex" groupName="itemPicker"
label="{labelData}"/>
> </mx:HBox>
>
>
>
>
>
>
>
>
> _____
>
> Yahoo! Groups Links
>
> * To visit your group on the web, go to:
> http://groups.yahoo.com/group/flexcoders/
>
> * To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
>
> * Your use of Yahoo! Groups is subject to the Yahoo!
> <http://docs.yahoo.com/info/terms/> Terms of Service.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/