views:

89

answers:

1

Hi, I am using a datagrid in flex and need to render each cell with a different style. What could be the best way to set a style to a perticular cell in datagrid/advanced datagrid (flex)?

I think one possible option can be extend the datagrid and override the drawRowBackgroungd function. Apart from this can i use some custom item renderer or some property similar to label function of a series, there it used to return label here we need a style.

Thanks in advance.

+1  A: 

I think Item renderers are your best option, you can use a canvas as your renderer and do whatever to it based on the data of that cell.

invertedSpear
Thanks invertedSpear.That means to use 'AdvancedDataGridRendererProvider' property with both 'columnspan' and 'rowspan' set to 1. Please correct me if I am wrong.
Ashine
Renderers can be used in a lot of different ways. I would look up a tutorial online and work off of one of those. This is the Adobe quick start for what you're doing. See if it will help you: http://www.adobe.com/devnet/flex/quickstart/using_item_renderers/
invertedSpear
Thanks invertedSpear :)
Ashine