Anurag,

 

Yes, as someone pointed out before, you can use a custom itemRenderer. Yours would look something like the code provided below. Notice that if you want the ComboBox to be editable, you should specify that renderIsEditor=”true” and specify the editorDataField.

 

<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" rendererIsEditor=”true” editorDataField=”selectedItem” >

    <mx:itemRenderer>

        <mx:Component>

             <mx:ComboBox>

                  <mx:dataProvider>

                       <mx:String> beginner</mx:String>

                       <mx:String> intermediate</mx:String>

                       <mx:String> expert</mx:String>

                  </mx:dataProvider>

            </mx:ComboBox>

         </mx:Component>

      </mx:itemRenderer>

</mx:DataGridColumn>

</mx:Array>
</mx:columns>
</mx:DataGrid>

 

Joan


From: [email protected] [mailto:[email protected]] On Behalf Of sahay17
Sent: Monday, September 11, 2006 2:38 AM
To: [email protected]
Subject: [flexcoders] Datagrid with a dropdown column!

 

Hi all,
I am having a datagrid "skillDG" with 2 datagridcolumn as "skillName"
and "ratingId" which is picking data from arraycollection.

<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" />

</mx:Array>
</mx:columns>
</mx:DataGrid>

But now i want that my datafieldcolumn "ratingId" to be a dropdown
with skills namely beginner,intermediate and expert. Is it possible?

Thanks and Regards,
Anurag.

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to