flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mark goldin <markzolo...@gmail.com>
Subject Re: Access DataGrid object from within Item renderer
Date Tue, 17 Feb 2015 14:55:42 GMT
What could work id this:

owner.parentList. At run time it points to DataGrid. But the compiler is
not compiling it. The error:
-Access of possibly undefined property parentList through a reference with
static type DisplayObjectContainer.

Object(owner).parentList will go thru compiling but the run time will
produce the error:
Error #1069: Property parentList not found on
mx.controls.listClasses.AdvancedListBaseContentHolder and there is no
default value.

How come it's not found if I can see that parentList is the main DataGrid?

Thanks

On Tue, Feb 17, 2015 at 8:28 AM, mark goldin <markzolotoy@gmail.com> wrote:

> this.owner gives me mx.controls.listClasses.AdvancedListBaseContentHolder,
> outerDocument does not work.
> this.owner.owner.owner will give me DataGrid. Is there any other way
> getting there?
>
> Thanks
>
> On Tue, Feb 17, 2015 at 12:45 AM, Alex Harui <aharui@adobe.com> wrote:
>
>> Depends.  It could be outerDocument, owner, or walking the parent chain.
>>
>> On 2/16/15, 12:35 PM, "mark goldin" <markzolotoy@gmail.com> wrote:
>>
>> >I have defined an item renderer as the following:
>> >
>> ><rendererProviders>
>> ><mx:AdvancedDataGridRendererProvider
>> >renderer="ItemNameCellField"
>> >column="{nameColumn}"/>
>> ></rendererProviders>
>> >
>> >How can I access datagrid from ItemNameCellField class?
>> >
>> >Thanks
>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message