开发者

AdvancedDataGrid dynamic text Value Coloring - ItemRenderer problem

开发者 https://www.devze.com 2022-12-25 22:24 出处:网络
In my AdvancedDataGrid, I am adding dynamic values to cells by dragging a cell value to other cells. While copying, I am setting the value to listData and setting the Red color to the value in ItemRe

In my AdvancedDataGrid, I am adding dynamic values to cells by dragging a cell value to other cells. While copying, I am setting the value to listData and setting the Red color to the value in ItemRenderer. Everything is working fine, but when I scroll down/up, the values remains in the cells where thay are supposed to be(as I am setting to listData) but the coloring behaves wierd(as I am trying to set the colo开发者_JAVA技巧r in ItemRenderer).

I don't want to store the color of the value, but I should be able to see the dynamically created values in Red color. Is there a way, I can do this? Do I need to set the color to actual dataprovider object and then check in ItemRenderer?

Can anyone help me with this?

public class CustomItemRenderer extends AdvancedDataGridItemRenderer

{

    private var _isDynamicValue:Boolean;        
        ....
        ....
     //_isDynamicValue is set to true if the value is dynamic
        if(_isDynamicValue && listData.label) { 
            setStyle("color", 0xFF0000);
            setStyle("fontWeight", "bold");
        }
        else {
            setStyle("color", 0x000000);
        } 


I didn't found a way to store those values temporarily. I stored the colored values indexes and checked them in ItemRenderer.

0

精彩评论

暂无评论...
验证码 换一张
取 消