Cannot change datagrid item background colour dynamically

Hello, I am trying to change the background colour of a data
grid item dynamically.
I am using a component for each item with the item_renderer
function
then in the component this is the line i am having trouble
with
<mx:Canvas width="100%" height="100%" id="item_bg"
backgroundColor="{data.status_colour}">
data.status_colour is definatly set and has a hex value,
#FF99CC for example
i tried
<mx:Canvas width="100%" height="100%" id="item_bg"
creationComplete="item_bg.setStyle("backgroundColour","{data.status_colour}")">
it did put colours on the but they were all in the wrong
place, so a completed item should be green but it is coming up with
red (failed)
any ideas??
thanks

You will need to use a custom calculation script, something like:
// Custom calculation script
(function () {
    // Get the field values, as numbers
    var v1 = +getField("Severity1").value;
    var v2 = +getField("Likelihood1").value;
    // Calculate the product
    var prod = v1 * v2;
    // Set this field's value;
    event.value = prod;
    // Default background color
    var bg = color.white;
    // Define the orange color
    color.orange = ["RGB", 1, .33, 0];
    // Determine background color based on the product
    if (prod >= 1 && prod <=5) {
        bg = color.green;
    } else if (prod > 5 && prod <= 10) {
        bg = color.orange;
    } else if (prod > 10) {
        bg = color.red;
    // Set this field's background color
    event.target.fillColor = bg;

Similar Messages

  • Change the desktop background colour of Acrobat 9 Professional?

    Is it possible to change the desktop background colour in Acrobat 9? The reason I ask is we are supplied newspaper ads and sometimes they have a black keyline on the border of the PDF.
    The dark background on the desktop can make it difficult to see a fine keyline. We were previously using Acrobat 7 Professional which had a white background.

    Doesn't work
              ^                                                                                    ^
    Obviously, I can't, in this particular screenshot show everything.
    This is what the fellow is talking about.  Naturally if his keyline item is in Black it ain't going to show up  In Acrobat previous to 9 all this back Ground was grey.

  • How do you change the slide background colour in the keynote app?

    How do you change the slide background colour in the keynote app?

    You can't (not in Keynote for iOS). The background color is a function of the template selected when you create the file initially and cannot be altered. the only workaround I know of is to add a graphic file to the slide and position it behind all other content, but this would need to be repeated on any slide you wish to "recolor".

  • For some reason, I cannot change my desktop background no matter how many times I delete the "active" folder.  It's as if it's locked.  Any ideas how I can fix it?

    For some reason, I cannot change my desktop background no matter how many times I delete the "active" folder.  It's as if it's locked.  Any ideas how I can fix it?

    Yes it sounds like you have a corrupted preference file.
    The setting you make in individual programs get saved to a Preference file in your Users/Library/Preferences folder.
    All you have to do is drag out the old file to the desktop, reboot and load the program and the preference file gets rebuilt without your preferences which you reset.
    For your case I beleive the preference file is
    com.apple.desktop.plist

  • Cannot delete login item "You cannot change this item because it's managed by your system administrator"

    We migrated a server (ldap and file serving) to some new machines, which have new names.  We've got all of the login and file sharing functionality working on the new machines, but wherever we have a mount of a share in the Login Items for a user, we can't get the old machine out of the Login Items.  It's not fatal, but it does make login take a lot longer because it has to fail first.
    We can mount the share from the new server, and save THAT in a NEW Login Item just fine -- it's just that when you click on the old defunct one the minus sign is greyed out, and the mouseover says "You cannot change this item because it's managed by your system administrator."  There is a yellow triangle next to the item in the list.  Went into the user's ~/Library/Preferences/com.apple.loginitems.plist and it's not in the file.  The /Library/Preferences don't have anything that looks like a plist of the right name.
    Where do I find it and how do I get rid of it?

    In response to ManishBhatt94's post today, I may have some information that may be useful to you. I called Microsoft's 800-642-7676 and spoke with a technical representative with questions pertaining to my particular issue. I also have friend that has the
    same issue with her computer running windows 8. A representative from my ISP told me how to go into 1)Tools, 2)Internet Options, 3)Connections, 4)LAN settings and uncheck the proxy settings box. However after restarting or shutting down my computer it reappears.
    It will also reappears while I play games on Facebook not allowing me continue until I go back into the proxy settings in LAN and uncheck the box AGAIN and AGAIN. A local owner of a computer repair shop told my friend that it was a virus. After speaking with
    Microsoft today I was told the same thing/it was more than likely a virus on my personal PC at home. As most people likely do,  I use wireless internet in my home on the affected computer. Solution; as suggested by Microsoft rep was to have the virus
    professionally removed either by someone or to use their remote service for a fee of $149 which comes with several guarantees and does not require you to re-install software or documents. I hope that my response was of some help to you. I also kept trying
    to fix this problem but wasted a lot of time. He also suggested to Google the proxy problem to see if ANYONE has any alternatives to fixing this problem!
     

  • After OS X 10.8.5, i cannot change my wallpaper background, it always jams and become irresponsive, can anybody help me out?

    After OS X 10.8.5, i cannot change my wallpaper background, it always jams and become irresponsive, can anybody help me out?

    I solved the problem, turns out my previous MLion or Lion OS was having bugs and corrupted. So when i update and install a new OS on top of previous corrupted one, it will be still corrupted. So i backup all my files and formatted my Mac using (Option key during startup) then reinstall MLion and everything works perfectly fine. I had a 8GB pendrive with Mac OS X Install file in it. The file was around 4++GB. So after formatting, i rebooted with (Hold option key duuring restart) then log in to my pendrive, and installation of fresh new copy of the OS started automaticaly, Now everything works perfectly fine.

  • Change 'Elegant Brochure' background colour

    Hi there,
    Making a brochure for our wedding (using the option under brochure of 'Elegant Brochure') to go along with the invites. Is there any way we can change the brown background colour to match our wedding's black, red and white theme colour while keeping the pattern in the original colour scheme? Basically just want to change the brown background to a light red.
    Thanks for your help.
    Message was edited by: Cheeky Whitey

    Click on the panel. Note the little Xs? That means it’s locked. In the Arrange menu choose unlock. Because the panel is a JPEG instead of a shape, bring up the Adjust Image pane and use the various sliders to produce the color you want. It might be a good idea to Lock them again after you change the color.
    Walt

  • A problem changing applet's background colour

    Hi there,
    I'm hoping somebody can help me with what I believe to be a problem I have in changing the background colour of an applet, the source code of which is posted below. If super.paint(g); is commented out, the background of the applet will be changed to whatever colour is specified, however if it is not the background will remain grey. As I understand though, super.paint(g); should be part of the program. What am I doing wrong? Should super.paint(g); in this example be part of the program?
    Before posting this I searched the forums and looked at some of the Q's & A's about changing an applet's background colour but am non the wiser.
    Thank you for your help.
    Regards,
    THE_TH1NG
    import javax.swing.*;
    import java.awt.Color;
    import java.awt.Graphics;
    public class Calculate extends JApplet
    public Calculate()
    //Variables used in our calculations.
    double sum; // Add the two numbers
    double product; // Multiply the two numbers
    double quotient; // The first number divided by the second number
    double difference; // The first number minus the second number - This may result in a negative value being returned
    double userInput1; //Stores the first number as a double after being converted from type string
    double userInput2; //Stores the second number as a double after being converted from type string
    public void init()
    String number1; // The first number to be entered by the user
    String number2; // The second number to be entered by the user
    number1 = JOptionPane.showInputDialog("Please enter the first floating point number"); // The user inputs the first number as a string
    number2 = JOptionPane.showInputDialog("Please enter the second floating point number"); // The user inputs the second number as a string
    // Convert the user's input from type string to type double
    userInput1 = Double.parseDouble( number1 );
    userInput2 = Double.parseDouble( number2 );
    // Perform the calculations
    sum = (userInput1 + userInput2);
    product = (userInput1 * userInput2);
    difference = (userInput1 - userInput2);
    quotient = (userInput1 / userInput2);
    public void paint( Graphics g )
    //The applets background will be set to the desired colour if super.paint(g) is commented out
    //But the background will remain grey if the code is not commented out.
    //What am I doing wrong?
    //super.paint( g );
    setBackground(new Color(50,150,255)); //Light Blue
    g.drawRect(10,10,250,100); // Draw a rectangle 250 pixels wide X 100 pixels high to enclose the rest of the program's output
    //Dispaly the results of the calculations to the user
    g.drawString( "The numbers entered are " + userInput1 + ", " + userInput2, 25, 25);
    g.drawString( "The sum is " + sum, 25, 40);
    g.drawString( "The product is " + product, 25, 55);
    g.drawString( "The difference is " + difference, 25, 70);
    g.drawString( "The quotient is " + quotient, 25, 85);

    You could try defining
    public void update(Graphics g) {
        paint(g);
    }That's the only difference I see between your code and my applet code. If that isn't it, you could try getContentPane().setBackground(...) but I don't know how that could make much difference (I would think that the content pane is transparent...)
    Another possibility is that, if you're using Swing, you probably shouldn't be overriding paint() and should stick to the paintComponent() method or whatever is appropriate.

  • How can I change the sms background colour?

    just upgraded to IOS7 on my Iphon 4s...don't like the over-bright white background on sms....how can I change the background colour for text messaging?

    There is no option to change the background color in the  messages app, other than selecting settings>general>accessibility>invert colors, but this changes the colors of everything.

  • Changing Slide Show Background Colour

    Being a newbie to this forum, I am not sure if this has been asked before, if so I apologise in advance.
    I have set my site up using the black background as it is a photography related site and the black lends itself well to the photographs.
    Is there a way of changing the parameters of the slide show to change the background colour from white to black ?
    Any help appreciated.
    Anton

    I guess you are not publishing to .Mac
    Here are some alternative slideshows for non-.Mac publishing (with black backgroudns)
    http://www.codemanic.com/blog-archives/000084.html
    http://discussions.apple.com/thread.jspa?messageID=4526950#4526950

  • FF updated something so that history takes up whole bottom half of screen; I cannot surf, or even see start menu. I cannot change menu items so that I am asked before something is downloaded and uopdated automatically. These were NOT my settings!

    My browser was very slow, so I cleared cookies and cache. When FF (4.0) restarted, it said it had installed colourful tabs (which I ALREADY HAD). I opened FF and typed in mmy first TE on my list ( I surf traffic exchanges). But I cannot do so on FF anymore. Only half my computer screen is from the TE or web page, and the bottom HALF of the screen is for History, etc. I cannot even see or access the Start menu or my open tabs at the bottom of the screen, unless I use Control and Escape.
    I got the url from FF 4.0 , uninstalled the old version and reinstalled it. Same thing. I uninstalled it again, straight from my control panel (Windows Vista Home Premium), cleared cookies and cache again, fixed registry problems again, and restarted my computer. STILL same thing!
    I tried to adjust settings, but it will not let me change what I need to. I cannot unclick that updates will be downloaded and installed automatically, and check that I want to be asked each time. I do not know if I can even SEE what was updated, to give you an idea if that could have caused this very nasty problem. Nasty, because until it is fixed, I will not be using FF.

    After following all the instructions given, I poked around safe websites as suggested. I am not sure why this step was needed, as websites functioned rather normally before I came here but I did it anyways and found that the websites still work the same as they did. I can still do everything I used to be able to do. I see no change in the function of the websites.
    However, I still cannot resize, close, or move the browser window. I don't know if Netflix is a safe site or not (too many conflicting opinions on that one from the masses) so I don't know if the issue with the vanishing buttons is still there, but all the issues I had with the browser window itself is still there.
    Even in safe mode the browsers three window control buttons on the top right refuse to let me use them and the window itself will refuse to be moved around.

  • How do I change the message background colour in mail,(2013)?

    I'd like to be able to do this.
    I send a lot of photos,(for my biz as an art photographer), and they would present FAR better on aa grey or black background than on the harsh and glaring white background.
    I haven't figured out how to create a coloured background template for the Stationary plug, or that might be an option.
    Any assistance would be greatly appreciate!

    You can't do that, but you can change the visual properties of the display by selecting Apple menu > System Preferences > Displays > Color > Calibrate...

  • Cannot change "Local Items" keychain password, menu is greyed out

    I have a Macosx linked to ActiveDirectory. Recently I had to change my AD password, which went fine, apart from the "Local Items" keychain. This keychain kept the old password.
    So everytime I login I get a few popups for different applications requesting the password for "Local Items". I have to enter the old password a number of times.
    If I go into Keychain Access, I can unlock this keychain. But I can't reset the password because the menu Edition \ Modify the password is greyed out.
    Does anybody know how I can change this password?
    iCloud is disabled on this iMac, and Repairing the keychain didn't find any problem.

    This is an easy fix. i called apple and they fixed it.  Go to finder, then  GO tab and click the option near command on keyboard and a link library will pop up in list and then click library,  scroll to find keychain and put it on your desktop and restart computer. You only have to log in one time and then delete keychain off desktop. something happened w maverick and it corrupted the file.

  • Installed osx snow leapord, and now i cannot change background

    I recently updated my computer to Mac OS X Snow Leopard which caused several things to happen.  #1 I cannot change the Desktop background picture.  #2 Programs i have deleted keep showing up in the Dock after restart, even though i keep deleting the dock items.  #3 Other programs i have installed (Quickbooks) wont stay in the dock.

    Have you tried repairing your Home Folder's Permissions?
    to do this:
    boot to the Mac OS X Snow Leopard Disk.
    chose your language.
    go to the menu bar
    click on the Utilities Menu
    chose reset password Utility
    when reset password utility opens
    chose your build in hard drive
    select your user account
    then click on the button "Repair Home Folder Permissions"
    Quit Reset Password Utility
    Quit the installer
    chose the built in hard drive as the drive to boot too
    when the computer reboots, you can try removing and adding items to the dock, then log out and back in to verify the changes to the dock were saved.

  • Change item background color on runtime

    Hello
    i have a List control in my application. What do I have to do
    to change its items background color on runtime?
    Thanks

    You have to access the style of the object and then set the
    piece of the style you want to change. You need to set
    backgroundColor.
    myList.setStyle("backgroundColor", "#ABABAB");
    #ABABAB is grey, and you can put any hex color value there
    you like.
    Hope that helps.

Maybe you are looking for

  • SSRS 2008 R2 matrix layout issue

    Hi, I am working on a report where I have to report total number of tickets resolved per Resource in a week and I get the total number of tickets from a different table and issues resolved from another and most of the aggregation I do it in my datase

  • Place XML into Library element

    Hi, I am automating the process of placing library element as anchored element. The actual task is, I have an sidenote text in the indesign document. These text also contains   XML tags. I want to place this sidenote text into an library item called

  • Help...Please Prevent Me From Smashing iPod With Hammer

    My Nano crashes my computer everytime I connect it. What the ** is going on & how do I fix this issue???

  • Msi 5124 serial port com1 com2

    i have a mainboard msi 5124 and want to use the serial port (COM1) for connecting a standard serial mouse. however i cannot get the mouse to work nor even be detected. not under dos nor under win98. before i used a ps/2 mouse, and never a serial mous

  • Problem reading pdf files

    I'm having trouble opening some recent pdf files with Adobe Reader.  This is a problem that has only happened in the last few weeks. All my older pdf files open without any problem. However all my more recently downloaded pdf files will not open. I g