Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

color coded datagrid

Posted on 2011-09-19
6
Medium Priority
?
240 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
6 Comments
 
LVL 29

Expert Comment

by:dgofman
ID: 36561444
Override DataGrid and you can get control on drawBackgroundColor
0
 
LVL 29

Expert Comment

by:dgofman
ID: 36561464
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
Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 

Author Comment

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

Accepted Solution

by:
dgofman earned 2000 total points
ID: 36562259
no only getColor function
0

Featured Post

Create CentOS 7 Newton Packstack Running Keystone

A bug was filed against RDO for the installation of Keystone v3. This guide is designed to walk you through the configuration for using Keystone v3 with Packstack. You will accomplish this using various repos and the Answers file.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
While opting for any web-to-print solution, you need to discuss with your team and some of your end users and know their opinions about your decisions. In this article we list down some questions you need to ask yourself.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

721 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