![]() |
Issue with dropdownlist in datagrid
2 Attachment(s)
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: Code:
[Bindable]Code:
<s:DropDownList x="338" y="280" dataProvider="{samplesDG}" labelField="tag"></s:DropDownList>Code:
<mx:DataGrid x="82" y="189" dataProvider="{samplesDG}" width="100%" height="100%" editable="true"> |
Try to create a proper itemrenderer with File->New->MXML ItemRenderer.
Then remove the default Label in the new itemrenderer and add a dropdownlist which you then can populate with the right data, and add event handling functions to if needed. Check the documentation, you'll get good info there. |
Thank you for your reply, hedberg.fi.
I did create a custom itemRenderer specifically for the MX DataGrid: Code:
<?xml version="1.0" encoding="utf-8"?>It seems that, since the dropdownlist is embedded in a datagrid column, I have to provide it with a separate list of just these tag values. The same thing happens with a combobox. Any other ideas/thoughts? |
Did that did the trick
Try going through this article at:- http://www.4guysfromrolla.com/webtech/050801-1.shtml Hope that helps |
| All times are GMT +1. The time now is 09:40 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.