dropdownlist in datagrid


hello all,

 

i'm noob in flex. i'm trying embed dropdownlist in datagrid cell. here's code:

 

[bindable]

private var employeelist:arraycollection;

]]>

</fx:script>

<fx:declarations>

<!-- place non-visual elements (e.g., services, value objects) here -->

 

<s:httpservice id="employeeservice"

   url="http://abc.com/abc/emp.xml"

   result="employeelist=employeeservice.lastresult.employees.employee"/>

</fx:declarations>

<mx:datagrid  dataprovider="{employeelist}" width="300" editable="true">

<mx:columns>

<mx:datagridcolumn headertext="reportees" datafield="loginid"/>

<mx:datagridcolumn headertext="projects" >

<mx:itemrenderer>

<fx:component>

            <s:dropdownlist dataprovider="{employeelist}" >

 

</s:dropdownlist>

</fx:component>

</mx:itemrenderer>

</mx:datagridcolumn>

</mx:columns>

 

the xml requesting follows:

<?xml version="1.0" ?>

<employees>

<employee>

  <loginid>rambo</loginid>

  <name>ramboman</name>

  <projects>

   <project>

    <name>atn</name>

    <id>34</id>

   </project>

   <project>

    <name>dtn</name>

    <id>43</id>

   </project>

   <project>

    <name>xtn</name>

    <id>54</id>

   </project>

  </projects>

  </employee>

</employees>

 

i want projects appear dropdown in second column. how do that?

 

thanks in advance

bo

looks you've got right approach. in way failling? suggest testing hard-coded data provider remove layer of complexity.



More discussions in Flex (Read Only)


adobe

Comments

Popular posts from this blog

CS5 Adobe Media Encoder: Encode failed because the source duration is nil.

cf_sql_integer vs cf_sql_bigint vs cf_sql_int??

localhost/joomla15/administrator doesnt work - Joomla! Forum - community, help and support