If you got that error, you didn’t set it up correctly.  What does your code 
look like?  You basically have to delegate to/from the Grid to the inner 
ComboBox.


On 6/3/10 12:40 PM, "Goutham" <[email protected]> wrote:






Hi Alex,

thank you, I tried it using an id for the combobox, gives me an error
"Access of possibly undefined property foo through a reference with static type 
mx.containers:Grid"

and there is also another problem, when I click on the column in the datagrid, 
the itemeditor changes to a combobox with the default value to be the first one 
in the dataprovider instead of the selected one

this didn't happen in the first case (first case I mean with out using the grid 
and gridrow) but here, I get a warning "uable to bind to property 'datafield' 
on class 'object' (class is not an IEventDispatcher)

any suggestions

thank you

--- In [email protected] <mailto:flexcoders%40yahoogroups.com> , Alex 
Harui <aha...@...> wrote:
>
> One way is to set an id="foo" on the ComboBox, then use
>
> object.data = ComboBox(Grid(event.currentTarget.itemEditorInstance).foo).text;
>
> On 6/2/10 1:00 PM, "Goutham" <goldensu...@...> wrote:
>
>
>
>
>
>
> Hi,
>
> I have a combobox in item editor in a datagrid. the combobox is populated 
> with a dataprovider. All this works fine until I place this combobox inside a 
> gird
>
> working code
> ------------
>
> mxml code
> ---------
>
> <datagridcolumn>
>  <itemeditor>
>  <component>
>  <combobox dataprovider="{outerDocument.data}" ... />
>  </component>
>  </itemeditor>
> </datagridcolumn>
>
> actionscript code
> -----------------
> object.data = ComboBox(event.currentTarget.itemEditorInstance).text;
>
> problematic code
> ---------------
>
> <datagridcolumn>
>  <itemeditor>
>  <component>
>  <grid>
>  <gridrow>
>  <griditem>
>  <combobox dataprovider="{outerDocument.data}" ... />
>  </griditem>
>  </gridrow>
>  </grid>
>  </component>
>  </itemeditor>
> </datagridcolumn>
>
> actionscript code
> -----------------
> object.data = ComboBox(event.currentTarget.itemEditorInstance).text;
>
> error in the action script code:
> ---
> cannot convert _inlinecompone...@3780479 to mx.controls.ComboBox
>
> Here the itemeditorinstance is a grid so, probably its not able to convert to 
> combobox, how do we get the selected value of the combobox from the 
> itemeditor ?
>
> I use the grid, as the rows are of variable height and the combobox looks 
> huge if the height of the row is more
>
> Thank you
>
>
>
>
>
>
> --
> Alex Harui
> Flex SDK Team
> Adobe System, Inc.
> http://blogs.adobe.com/aharui
>






--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui

Reply via email to