Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Contributor
Posts: 13
Registered: ‎01-30-2011
My Device: Not Specified

dropdownlist itemrenderer within datagrid

hi

 

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 !

 

cheers

 

Stephen

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: dropdownlist itemrenderer within datagrid

[ Edited ]

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.

Contributor
Posts: 13
Registered: ‎01-30-2011
My Device: Not Specified

Re: dropdownlist itemrenderer within datagrid

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

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: dropdownlist itemrenderer within datagrid

Be interested to see a screen shot too.  Make certain your row heights are around 45-50 pixels.

Contributor
Posts: 13
Registered: ‎01-30-2011
My Device: Not Specified

Re: dropdownlist itemrenderer within datagrid

 

 

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' ?

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: dropdownlist itemrenderer within datagrid

"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).