Solved

color coded datagrid

Posted on 2011-09-19
6
230 Views
Last Modified: 2012-05-12
Hi guys

I have a requirment where i have a datagrid. the datagrid boxes should be color coded

for example
if status == Delinquent  ,it should be red
if status == yellow , it should be yellow.
I have attached a sample image.
 colorcoded gridAny idea how i can do that?


thanks
0
Comment
Question by:royjayd
  • 4
6 Comments
 
LVL 29

Expert Comment

by:dgofman
Comment Utility
Override DataGrid and you can get control on drawBackgroundColor
0
 
LVL 29

Expert Comment

by:dgofman
Comment Utility
0
 
LVL 29

Expert Comment

by:dgofman
Comment Utility
In your case you need modify getColor function

private function getColor(itemRenderer:IListItemRenderer, defaultColor:Number):Number{
                  if(itemRenderer && itemRenderer.data.status == "Delinquent ")
                        return 0xff0000;
if(itemRenderer && itemRenderer.data.status == "yellow ")
                        return 0xffff00;
                  return defaultColor;
            }
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:royjayd
Comment Utility
do i need to modify  drawBackgroundColor () also ?
0
 
LVL 29

Accepted Solution

by:
dgofman earned 500 total points
Comment Utility
no only getColor function
0
 
LVL 37

Expert Comment

by:zzynx
Comment Utility
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now