This issue is regarding datagrid. I am working on a functionality which involves the coloring of datagrid cell. When the user clicks a cell, a dropdown appears having the color names. This dropdown is a separate component which has been set as the item editor of the datagrid column. After selecting the color form the dropdown, the color gets applied to the clicked cell through a custom item renderer applied to the column. A method in the custom item renderer has the code for drawing a graphic with the color selected by the user. Now the issue is that whenever, we scroll, the colors in the datagrid cells get shifted downwards. This also happens if I move to the other tabs and come back to this tab having the datagrid.
If the color of the first and second cell in a column is changed, when I scroll horizontally, the colors in the first and second cell get shifted to the third and fourth cell and so on...This also happens when we switch across the tabs...
What I understand is that on scrolling the updateDisplayList gets called. That is why the color changes...But how to retain the colors selected by the user.
Thanks in advance.
Pls check your the item renderer. You must need to mentioned code as below inside your item Renderer.Then it should work fine.
override public function set data(value:Object):void
super.data = value;
For more details you can check this thread.Although it is for the List but you can do similarly for the datagrid.
Shardul Singh Bartwal