03-05-2011 07:30 PM
just wondering if anyone has any advice or good examples for the following, I'm finding it a little tough to find a good example on the net
i've got a datagrid, and one column with an item renderer that has a dropdown list
i want of course to be able to reflect the choice in this dropdown list back into my data provider ie. the original array collection
i cant seem to be able to catch any events from the item renderer ?
also need to be able to select the right drop down item when the grid loads up
would appreciate any pointers !
03-05-2011 07:39 PM - edited 03-05-2011 07:39 PM
Assuming when you say datagride, you mean mx: DataGrid.
You have to create a custom renderer for a ComboBox (not a drop down) and also set the attributes to say that it is a editor as well. Use the mx:ComboBox and not the spark:ComboBox unless you want them to edit in cell as well for a choice.
There are many example out there for datagrid custom renderers for combo boxes.
Here's one: http://forums.adobe.com/thread/717754 (others exist too)
I would (and I am sure others) be interested to know if you were able to scale this to a touch screen size and have it work on the simulator.
03-06-2011 04:44 AM
excellent thank you I'll look into that
its a spark datagrid, so I guess I should use the spark combo box
it was a spark dropdown list that i was using
when I get something working, I'll post in some code
03-06-2011 09:36 PM
I decided not to go with this approach as I found it too difficult to get it to work !
just going with a simple pop up window
but I've a better question
is the spark dropdownlist touch enabled ?
how in general can you tell if a spark component is touch enabled as it would seem that some of them are 'not mobile optimized' ?
03-07-2011 07:29 AM
"Touch" events also send out mouse down/click/up events. So it would respond to a finger touch as much as a mouse click. "Mobile optimized" deals with sizing the control so it is large enouph for the finger and remove items that are just too small to manipulate with a finder (e.g. scroll bars).