You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by mark goldin <ma...@gmail.com> on 2015/02/16 21:35:22 UTC

Access DataGrid object from within Item renderer

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

Re: Access DataGrid object from within Item renderer

Posted by mark goldin <ma...@gmail.com>.
Yes, that was it, thanks.

On Thu, Feb 19, 2015 at 2:06 AM, Alex Harui <ah...@adobe.com> wrote:

> That sounds like your renderer isn’t implementing IDropInListItemRenderer.
>  Doing so may help solve your problem.
>
> -Alex
>
> On 2/18/15, 6:12 AM, "mark goldin" <ma...@gmail.com> wrote:
>
> >listData isn't there.
> >
> >On Wed, Feb 18, 2015 at 2:34 AM, Alex Harui <ah...@adobe.com> wrote:
> >
> >> Also try listData.owner.
> >>
> >> -Alex
> >>
> >> On 2/17/15, 6:55 AM, "mark goldin" <ma...@gmail.com> wrote:
> >>
> >> >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 <ma...@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 <ah...@adobe.com>
> >>wrote:
> >> >>
> >> >>> Depends.  It could be outerDocument, owner, or walking the parent
> >> >>>chain.
> >> >>>
> >> >>> On 2/16/15, 12:35 PM, "mark goldin" <ma...@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
> >> >>>
> >> >>>
> >> >>
> >>
> >>
>
>

Re: Access DataGrid object from within Item renderer

Posted by Alex Harui <ah...@adobe.com>.
That sounds like your renderer isn’t implementing IDropInListItemRenderer.
 Doing so may help solve your problem.

-Alex

On 2/18/15, 6:12 AM, "mark goldin" <ma...@gmail.com> wrote:

>listData isn't there.
>
>On Wed, Feb 18, 2015 at 2:34 AM, Alex Harui <ah...@adobe.com> wrote:
>
>> Also try listData.owner.
>>
>> -Alex
>>
>> On 2/17/15, 6:55 AM, "mark goldin" <ma...@gmail.com> wrote:
>>
>> >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 <ma...@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 <ah...@adobe.com>
>>wrote:
>> >>
>> >>> Depends.  It could be outerDocument, owner, or walking the parent
>> >>>chain.
>> >>>
>> >>> On 2/16/15, 12:35 PM, "mark goldin" <ma...@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
>> >>>
>> >>>
>> >>
>>
>>


Re: Access DataGrid object from within Item renderer

Posted by mark goldin <ma...@gmail.com>.
listData isn't there.

On Wed, Feb 18, 2015 at 2:34 AM, Alex Harui <ah...@adobe.com> wrote:

> Also try listData.owner.
>
> -Alex
>
> On 2/17/15, 6:55 AM, "mark goldin" <ma...@gmail.com> wrote:
>
> >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 <ma...@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 <ah...@adobe.com> wrote:
> >>
> >>> Depends.  It could be outerDocument, owner, or walking the parent
> >>>chain.
> >>>
> >>> On 2/16/15, 12:35 PM, "mark goldin" <ma...@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
> >>>
> >>>
> >>
>
>

Re: Access DataGrid object from within Item renderer

Posted by Alex Harui <ah...@adobe.com>.
Also try listData.owner.

-Alex

On 2/17/15, 6:55 AM, "mark goldin" <ma...@gmail.com> wrote:

>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 <ma...@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 <ah...@adobe.com> wrote:
>>
>>> Depends.  It could be outerDocument, owner, or walking the parent
>>>chain.
>>>
>>> On 2/16/15, 12:35 PM, "mark goldin" <ma...@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
>>>
>>>
>>


Re: Access DataGrid object from within Item renderer

Posted by mark goldin <ma...@gmail.com>.
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 <ma...@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 <ah...@adobe.com> wrote:
>
>> Depends.  It could be outerDocument, owner, or walking the parent chain.
>>
>> On 2/16/15, 12:35 PM, "mark goldin" <ma...@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
>>
>>
>

Re: Access DataGrid object from within Item renderer

Posted by mark goldin <ma...@gmail.com>.
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 <ah...@adobe.com> wrote:

> Depends.  It could be outerDocument, owner, or walking the parent chain.
>
> On 2/16/15, 12:35 PM, "mark goldin" <ma...@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
>
>

Re: Access DataGrid object from within Item renderer

Posted by Alex Harui <ah...@adobe.com>.
Depends.  It could be outerDocument, owner, or walking the parent chain.

On 2/16/15, 12:35 PM, "mark goldin" <ma...@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