Hi Tim,
 
thanks for the answer!
It would have been helpful if you also said that the interface mx.controls.listClasses.IDropInListItemRenderer has to be implemented but now I got it working.
 
Cheers,
Sönke


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tim Hoff
Sent: Friday, October 27, 2006 5:19 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: ItemRenderer - Which dataField from DataGridColumn?

Hi Sönke,

You can get the name of the field with the following code.  From there you can adjust your itemRenderer conditionally.

if (listData) {
    var myListData:DataGridListData = DataGridListData(listData);
    var fieldName : String = myListData.dataField;
}

don't forget the  import:

import mx.controls.dataGridClasses.DataGridListData;

-TH
__________________________________

Tim Hoff
Cynergy Systems, Inc.
http://www.cynergysystems.com
Office
: 866-CYNERGY 

--- In flexcoders@yahoogroups.com, Sönke Rohde <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I need to access the reference to the DataGridColumn within an custom
> ItemRenderer which is implemented via MXML.
> Do I have to extend a special class for my ItemRenderer or can I acccess it
> via "parent"?
> When I trace the parent in my ItemRenderer I get e.g.
> "ListBaseContentHolder7".
> What I need to no is which dataField has to be rendered within my
> ItemRenderer so I can access the right value in my ValueObject.
>
> Here the MXML for the DataGridColumn:
> <mx:DataGridColumn dataField="example" headerText="Header"
> itemRenderer="CustomItemRenderer"
> />
> So how do I know within the class CustomItemRenderer that the dataField is
> "example"?
>
> Thanks,
> Sönke
>

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to