Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 244
  • Last Modified:

color coded datagrid

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
royjayd
Asked:
royjayd
  • 4
1 Solution
 
dgofmanCommented:
Override DataGrid and you can get control on drawBackgroundColor
0
 
dgofmanCommented:
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
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
royjaydAuthor Commented:
do i need to modify  drawBackgroundColor () also ?
0
 
dgofmanCommented:
no only getColor function
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now