|
INTERVIEW QUESTIONS
WEB
ACTION SCRIPT
DETAILS
Question: How does item renderer work? How do we add item renderer at runtime in flex?
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.
|
|
|
Category |
Action Script Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 7618 users |
Added on |
9/22/2014 |
Views |
69224 |
Rate it! |
|
|
Question:
How does item renderer work? How do we add item renderer at runtime in flex?
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. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
What is state? what is the difference between states and ViewStack in flex?
|
View Answer
|
|
What is MVC and how do you relate it to flex apps?
|
View Answer
|
|
What is the difference between sealed class and dynamic classes in flex?
|
View Answer
|
|
How do we use css styles in flex?
|
View Answer
|
|
what are three ways to skin a component in flex?
|
View Answer
|
|
How do you use a repeater in actionscript?
|
View Answer
|
|
How do we call javascript from Flex actionscript?
|
View Answer
|
|
What is a drag manager in adobe flex actionscript?
|
View Answer
|
|
Can you write to the file system from flex?
|
View Answer
|
|
What are the methods called when a UI component is intialized?
|
View Answer
|
|
How do you implement push with flex data services?
|
View Answer
|
|
What is the dynamic keyword used for in flex actionscript?
|
View Answer
|
|
What are the similarities between java and flex?
|
View Answer
|
|
What is a resource Manager in flex actionscript?
|
View Answer
|
|
I am going to add images into a tag. How will it resize itself in adobe flex actionscript?
|
View Answer
|
|
How do you implement push on a flex applications?
|
View Answer
|
|
Have you built any components with actionscript? If so explain how you did it?
|
View Answer
|
|
How do you generate random numbers within a given limit with actionscript?
|
View Answer
|
|
What is the difference between httpService and Data Service?
|
View Answer
|
|
I need to load an image from flickr into my application. Do I need a crossdomain.xml file on flickr?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All Action Script Interview Questions & Answers - Exam Mode /
Learning Mode
|