Hi all,
I m having a datagrid which has a column "Rating" as a drop down.The
dataprovider _model is an arraycollection. Now what I want is that if
the datafield "ratingId" is 'B' I should populate "Beginner" in the
drop down. Similarly if I ve "ratingId" as 'I', I should
populate "Intermediate" in the drop down.Similarly if I
ve "ratingId" as 'E', I should populate "Expert" in the drop
down.How to bind the drop down as such? Or is there a better way of
doing this?
---------------------------------------------
DROP DOWN:-
<mx:Component id="skillLevel">
<mx:ComboBox>
<mx:String>Beginner</mx:String>
<mx:String>Intermediate</mx:String>
<mx:String>Expert</mx:String>
</mx:dataProvider>
</mx:ComboBox>
</mx:Component>
-------------------------------------------------
DATA GRID
<mx:DataGrid id="skillDG" width="100%" height="100%"
sortableColumns="true" dataProvider="{_model}" editable="true">
<mx:columns>
<mx:Array>
<mx:DataGridColumn headerText="Skill Name"
dataField="skillName" editable="false"/>
<mx:DataGridColumn headerText="Rating"
dataField="ratingId" editorDataField="selectedItem"
itemEditor="{skillLevel}"/>
</mx:Array>
</mx:columns>
</mx:DataGrid>
Thanks,
Anurag.
--
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/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> 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/