Thanks Jeremy for the Tip.

Tim


--- In flexcoders@yahoogroups.com, "Jeremy Lu" <[EMAIL PROTECTED]> wrote:
>
> is this FB2 ? (there sould be no setValue() method in FB2).
> 
> as to the question, you don't necessaryly have to put a radio group
in each
> row to achive what you want.
> 
> simply place a RadioButton in the item renderer then toggle it's
"selected"
> property should do the trick, oh, of course there should be 3
columns/fields
> in your Model which stores the values for the toggle status.
> 
> pseudo code ( in the item renderer) :
> 
> public override function set data(value:Object):void{
>     //datagrid item will be passed in here
>     //use this data to toggle each of the radio button's selected
property.
> }
> 
> Jeremy.
> 
> On 6/10/06, sufibaba <[EMAIL PROTECTED]> wrote:
> >
> >   Hi all,
> >
> > I have a Datagrid with 4 columns. The Dataprovider is bounded to model
> > locator variable so the rows are being generated on the fly. I want
> > to create a distinct radio groupname for each row so that only
> > Yes/No/either can be selected.
> >
> > product Yes No Either
> > -------------------------------------------
> > item1 -- radio1 -- radio2 -- radio3
> > item2 -- radio1 -- radio2 -- radio3
> > item3 -- radio1 -- radio2 -- radio3
> > item4 -- radio1 -- radio2 -- radio3
> > item5 -- radio1 -- radio2 -- radio3
> >
> > -------------------------
> >
> > <mx:DataGrid id="myGrid" dataProvider="{model.productList}"
> > variableRowHeight="true" height="100%">
> > <mx:columns>
> > <mx:DataGridColumn dataField="label" headerText="Layout
> > Containing" width="130" />
> > <mx:DataGridColumn dataField="Yes" headerText="Yes" width="40"
> > itemRenderer="RadioButtonCellRenderer"/>
> > <mx:DataGridColumn dataField="No" headerText="No" width="40"
> > itemRenderer="RadioButtonCellRenderer"/>
> > <mx:DataGridColumn dataField="Either" headerText="Either"
> > width="50" itemRenderer="RadioButtonCellRenderer"/>
> > </mx:columns>
> > </mx:DataGrid>
> >
> > ------------- RadioButtonCellRenderer.as ---------------
> >
> > package
> >
> > {
> > import mx.controls.RadioButton;
> >
> > public class RadioButtonCellRenderer extends RadioButton
> > {
> >
> > public function RadioButtonCellRenderer():void{
> > super();
> >
> > }
> > }
> >
> > public function setValue():void{
> >
> > }
> >
> > }
> > }
> >
> >  
> >
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Everything you need is one click away.  Make Yahoo! your home page now.
http://us.click.yahoo.com/AHchtC/4FxNAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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/
 



Reply via email to