Dirk -
Many thanks for your suggestions - but I'm still struggling to make this work.
I guess I need a more complete, simple example of multiple comboboxes in
multiple datagrid rows so I can build off of that.
Can you - or anyone else - provide or point to such an example?
- Tom
At 10:34 AM 3/29/2005, you wrote:
>Hi,
>
>I usually subclass the DataGridColumn class to customize the assigned cell
>renderer. This way you can easily pass extra information (in your case the
>dataprovider for the combo boxes) directly to the column. The cellrenderer
>then "asks" its row for the dataprovider to use:
>
><mx:DataGrid ... >
> <mx:columns>
> <my:ExtendedDataGridColumn cellRenderer="ComboRenderer"
> dataProvider="{arr1}"/>
> <my:ExtendedDataGridColumn cellRenderer="ComboRenderer"
> dataProvider="{arr2}"/>
> <my:ExtendedDataGridColumn cellRenderer="ComboRenderer"
> dataProvider="{arr3}"/>
> </mx:columns>
></mx:DataGrid>
>
>ExtendedDataGridColumn just extends the
>mx.controls.gridclasses.DataGridColumn class and adds a public variable
>dataProvider.
>
>Inside the cellRenderer class ComboRenderer (which you could implement as
>a direct subclass of mx.controls.ComboBox) you can then access the
>correct dataProvider by doing this
>
>function init():Void {
> super.init();
> dataProvider = listOwner.getColumnAt(getCellIndex().columnIndex);
>}
>
>Dirk.
>
>
> > -----Original Message-----
> > From: Tom Fitzpatrick [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, March 29, 2005 5:23 PM
> > To: [email protected]
> > Subject: [flexcoders] Comboboxes in datagrid
> >
> >
> >
> > I'm trying to create a datagrid that holds three-column rows with a
> > comboBox in each cell.
> >
> > I assume I have to use a cellrenderer to accomplish this - is
> > this correct?
> > I've been experimenting with cellrenderer examples on the
> > rich internet
> > apps site (Webster/McLeod) and one posted by Dirk Eismann. Both these
> > assume only one comboBox per row, and I haven't found a way
> > to add three
> > per row, each with a different dataProvider. So close, yet so
> > far. Any tips
> > (or code to share)?
> >
> > - Tom
> >
> >
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
>
>Yahoo! Groups Sponsor
>ADVERTISEMENT
><http://us.ard.yahoo.com/SIG=129ss640v/M=298184.6191685.7192823.3001176/D=groups/S=1705007207:HM/EXP=1112196939/A=2593423/R=0/SIG=11el9gslf/*http://www.netflix.com/Default?mqso=60190075>
>click here
>
>[]
>
>
>
>----------
>Yahoo! Groups Links
> * To visit your group on the web, go to:
> *
> <http://groups.yahoo.com/group/flexcoders/>http://groups.yahoo.com/group/flexcoders/
>
>
> *
> * To unsubscribe from this group, send an email to:
> *
> <mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]
>
> *
> * Your use of Yahoo! Groups is subject to the
> <http://docs.yahoo.com/info/terms/>Yahoo! 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/