Solved

color coded datagrid

Posted on 2011-09-19
6
234 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
ID: 36561444
Override DataGrid and you can get control on drawBackgroundColor
0
 
LVL 29

Expert Comment

by:dgofman
ID: 36561454
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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

Author Comment

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

Accepted Solution

by:
dgofman earned 500 total points
ID: 36562259
no only getColor function
0
 
LVL 37

Expert Comment

by:zzynx
ID: 36566358
0

Featured Post

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

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…
This problem is more common than not and I will show you some things to check to solve this problem.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

773 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