2 Replies Latest reply on Sep 5, 2010 9:09 PM by Flex harUI

    Colors of the datgrid cell change on scrolling

    Shally Dhar



      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.