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
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>
|
smime.p7s
Description: S/MIME cryptographic signature