Question : How does item renderer work? How do I add item renderer at runtime?
Answer :: Each list control has a default mechanism for controlling the display of data, or view, and lets
you override that default. To override the default view, you create a custom item renderer.
Note: With reusable inline item renderers you use data binding to bind to the item renderer. When
you use a component as an item renderer, you do not use data binding but specify the name of the
custom component to use as an item renderer.
Add itemrendrer at run time: Create the basic item renderer. One of the things I needed to accomplish
with my item renderer was the ability to add it to different columns (ie the dataField was not always
the same). This meant I needed a way from within the renderer to determine what column it was
bound to so I could get and display the correct data. To do this the renderer needs to implement the
IDropInListItemRenderer. This interface allows the renderer to have access to information about the
list and column it is in via the BaseListData and DataGridListData classes. The DataGridListData
gives you everything you need to get the data required to make a flexible, reusable renderer.
To Modify itemrenderer at runtime we Need to use mx.core.ClassFactory. Basically, in order to
change a Flex itemRenderer at runtime, you need to cast it to a type ClassFactory.
www.interviewhelper.org is a hope for all the Job seekers. Users can find unlimited here. These range from technical to HR, from functional to behavioral. www.interviewhelper.org contains in the fields like Ajax,VB,Networking,Sharepoint,JEE,Perl,Javascript,Bioinformatics,Classic ASP,Unix,Linux,Accounting,Oracle DBA,Microprocessor,Bluetooth,jms,jme,.net framework,ABAP,ASP,ASP.net,Basic .net Framework,Interview Questions,C language,C++,database,Oracle,Java,PHP,LAMP,SAP etc.
Friday, March 27, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment