bon_t
07-30-2010, 10:06 PM
I'm using Flex 4. I'm trying to embed a dropdownlist into a datagrid column. When I have the drop-down list on its own, the three "tag" values (i.e. ACCOUNTS, ENQUIRY, PLAN) appear as expected. However, when the drop-down list is embedded in the column, only the "tag" value for that row appears and the anchor arrow disappears. I want the user to be able to modify existing values in the drop-down list or to enter new values, hence I left the data column to be editable. I did try setting editable="false" but then no values at all would show up.
Thanks for your guidance!
Here are the relevant snippets of my code:
[Bindable]
private var samplesDG:ArrayCollection = new ArrayCollection([{"index":1,"count":44,"tag":"ACCOUNTS","fake":"false","audioFile":"C:\\Tagging_Station\\20070206000004\\chan 23-20070223161414.ulaw","comments":"","transcriptionError":"","transcr iption":"i'd like to dispute my current billing account"},{"index":2,"count":21,"tag":"ENQUIRY","fake":"true","audioFile":"C:\\Tagging_Station\\20070206000004\\chan2 3-20070227134917.ulaw","comments":"","transcriptionError":"","transcri ption":"customer service"},{"index":3,"count":37,"tag":"PLAN","fake":"false","audioFile":"C:\\Tagging_Station\\20070206000004\\chan 19-20070206081117.ulaw","comments":"","transcriptionError":"","transcr iption":"a phone plan"}]);
<!-- THIS IS THE DROPDOWNLIST ON ITS OWN (first attached picture) -->
<s:DropDownList x="338" y="280" dataProvider="{samplesDG}" labelField="tag"></s:DropDownList>
<!-- THIS IS THE DROPDOWNLIST IN THE COLUMN (second attached picture) -->
<mx:DataGrid x="82" y="189" dataProvider="{samplesDG}" width="100%" height="100%" editable="true">
<mx:columns>
<mx:DataGridColumn headerText="Tag" dataField="tag">
<mx:itemRenderer>
<fx:Component>
<s:MXDataGridItemRenderer>
<s:DropDownList labelField="{data.tag}"/>
</s:MXDataGridItemRenderer>
</fx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>
Thanks for your guidance!
Here are the relevant snippets of my code:
[Bindable]
private var samplesDG:ArrayCollection = new ArrayCollection([{"index":1,"count":44,"tag":"ACCOUNTS","fake":"false","audioFile":"C:\\Tagging_Station\\20070206000004\\chan 23-20070223161414.ulaw","comments":"","transcriptionError":"","transcr iption":"i'd like to dispute my current billing account"},{"index":2,"count":21,"tag":"ENQUIRY","fake":"true","audioFile":"C:\\Tagging_Station\\20070206000004\\chan2 3-20070227134917.ulaw","comments":"","transcriptionError":"","transcri ption":"customer service"},{"index":3,"count":37,"tag":"PLAN","fake":"false","audioFile":"C:\\Tagging_Station\\20070206000004\\chan 19-20070206081117.ulaw","comments":"","transcriptionError":"","transcr iption":"a phone plan"}]);
<!-- THIS IS THE DROPDOWNLIST ON ITS OWN (first attached picture) -->
<s:DropDownList x="338" y="280" dataProvider="{samplesDG}" labelField="tag"></s:DropDownList>
<!-- THIS IS THE DROPDOWNLIST IN THE COLUMN (second attached picture) -->
<mx:DataGrid x="82" y="189" dataProvider="{samplesDG}" width="100%" height="100%" editable="true">
<mx:columns>
<mx:DataGridColumn headerText="Tag" dataField="tag">
<mx:itemRenderer>
<fx:Component>
<s:MXDataGridItemRenderer>
<s:DropDownList labelField="{data.tag}"/>
</s:MXDataGridItemRenderer>
</fx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>