2 Replies Latest reply on Sep 9, 2008 8:22 AM by EricJ32

    Stopping text colour change on AdvancedDataGrid rollOver

    EricJ32 Level 1
      OK, I have an ADG with several columns, one of which is a number. I use the styleFunction property of the column to set the text colour of these cells to green for a positive value and red for a negative value. Works great.
      Now, I need to have a rollOver effect, which highlights the row silver. Again, this is fine. The thing I am having difficulty with is, when the row is either rolled-over or selected, the text colour of every cell is set to black. I need it to keep the original text colours, so the value cell continues to have ether red or green text, depending on the value, and the remaining cells have their default colour (black).

      Can anyone help me with this?

      Thanks!
        • 1. Re: Stopping text colour change on AdvancedDataGrid rollOver
          EvolvedDSM Level 2
          I'm only getting you 50% of the way on this because I don't know how to keep two colors the same. However there's a style property with all data grids that sets the roll over color for text.
          You will need to set up a Style for your ADG and include
          textRollOverColor: #ff0000;
          in it.

          Like this:
          DataGrid {
          textRollOverColor: #ff0000;
          }

          Now something you might want to look into is making the color code dynamic, like textRollOverColor: {myColor}
          or something to that degree. Again, I've never needed this, however I figured I would point out the basic style property and let you play with it.
          • 2. Re: Stopping text colour change on AdvancedDataGrid rollOver
            EricJ32 Level 1
            Thanks for that, but I don't see how this will really help. I've looked at the textRollOverColor, and it seems to set the rollover colour for the entire row, which is not what I need, because I need the first four cells to remain with their black text and only the last one to be red or green.
            In fact, the only property I want to change on the rollover is the background colour. Everything else should remain the same as it is in default view.