That pattern works for mx components in MX DataGrid, but Spark components
do not "drop-in" as item renderers.

I'm not sure if it is easier to subclass DDL and implement
IListItemRenderer or subclass mx:ComboBox and disable editing in the
TextInput.

-Alex

On 2/7/14 5:12 AM, "Maurice Amsellem" <maurice.amsel...@systar.com> wrote:

>Hi ,
>
>I am using mx:DataGrid with mx:ComboBox cell renderer with no issue.
>
>The way I do that is throught DataGridColumn itemRenderer.
>
>The way you populate the DDL is through the itemRenderer "data" variable,
>where data is the object for the rendered row.
>
>So it could be something like:
>
><mx:DataGrid ...>
>   <mx:columns>
>          <mx:DataGridColumn  >
>                    <itemRenderer>
>                       <fx:Component>
>                             <mx:ComboBox
>dataProvider="{data.someValues}"/>
>                      </fx:Component>
> ....
>
>HTH
>
>Maurice 
>
>-----Message d'origine-----
>De : Oleg Konovalov [mailto:oleg...@gmail.com]
>Envoyé : vendredi 7 février 2014 13:34
>À : dev@flex.apache.org
>Objet : Re: Rendering components in MX DataGrid
>
>Hi,
>
>
>
>Now I am able to render CheckBox and Button in MX DataGrid,
>
>but still can't use Spark DropDownList (or MX ComboBox)  inside DataGrid,
>
>and it¹s not working ­ DDL doesn¹t show up and cannot populate it.
>
>
>
>Here is my scenario:
>
>User Selects a Version from another DropDownList outside DataGrid on the
>same form,
>
>we capture that Version, and call Stored Proc with that version via Web
>Service,
>
>It returns us data which we need to populate inside these DropDown¹s.
>
>
>
>So far I cannot make these components to show inside DataGrid.
>
>In fact, as soon as I try to put them in the DataGrid (as itemRenderer
>with Component),
>
>It freezes that Version DropDownList, so no more Selection of Version is
>possible.
>
>
>
>I found a few examples on the net where all that is done with
>DropDownList in Spark DataGrid,
>
>but it doesn¹t seem to work in Flex3 ComboBox (and I can¹t give ID to
>that component inside DataGridColumn,
>
>so I can¹t manipulate it from outside.
>
>
>
>Any idea how to do that with Flex3 DataGrid?
>
>(we use Flex3 MX and datagrids/ADGs throughout that app,
>
>so switching to Flex4 DGs/ADGs is not an option).
>
>
>
>
>Please help!
>
>
>
>TIA,
>
>Oleg
>
>
>On Tue, Feb 4, 2014 at 8:03 AM, Christofer Dutz
><christofer.d...@c-ware.de>wrote:
>
>> Well please correct me if I'm on the wrong path, but if you have your
>> compoenents inside an Item Renderer, but don't have a single item to
>> render in the Container that uses this, then Flex doesn't Show a
>> single one of them. In order to have your itemrenderer used, you have
>> to provide your data Container with at least one element to make it
>> actually Display anything.
>>
>> Chris
>> ________________________________________
>> Von: Oleg Konovalov <oleg...@gmail.com>
>> Gesendet: Dienstag, 4. Februar 2014 13:49
>> An: flex-...@apache.org
>> Betreff: Rendering components in MX DataGrid
>>
>> Hi,
>>
>>
>>
>> I have tried to add Spark Dropdown, MX Checkbox and a Button in MX
>> DataGrid
>>
>> (as FX Component in itemRenderer). Neither of them had any data, I
>> just needed to see them displayed,
>>
>> but none of them displayed. Why?
>>
>> Each of them displayed fine outside of DataGrid
>>
>> Am I missing something?
>>
>>
>>
>> Using Flex 4.5.1.
>>
>>
>>
>>
>>
>> TIA,
>>
>> Oleg.
>>
>
>
>
>--
>Thank you,
>Oleg.

Reply via email to