views:

41

answers:

1

Hi, I have a DataGrid that is populated by an xml response of a web service. Currently, I poll every 5 seconds against the web service to maintain data freshness, as such is essential. Now, this polling can can change the data in one of the columns of the DataGrid, and I would like to style the rows with colors based on the content of a single cell of a row of the DataGrid.

Does anyone have any insight as to how to accomplish this? I'm at a bit of a loss as to where to start.

+1  A: 

what you want is styleFunction but I think you can only use this on an advancedDataGrid, I don't think the normal dataGrid supports this.

http://livedocs.adobe.com/flex/3/html/help.html?content=advdatagrid_04.html

You will pass the row object into the function and you can use logic to say whether or not to apply styles.

The only other thing I can think of if you can't use an AdvancedDataGrid is you could probably do it with an item renderer, but that would probably be much more work.

Ryan Guill
Looking at labelFunction, I thought there HAD to be some sort of styleFunction. This is exactly what I need.
Stefan Kendall