This content has been marked as final. Show 3 replies
"SiHoop" <firstname.lastname@example.org> wrote in message
>I have a class that draws different colored circles on the left column of a
> datagrid. This works as long as there are not enough entries in the grid
> require scrolling-- if that happens then I'm in trouble.
Why do you say that you're in trouble if you require scrolling?
Because the sprites are given x, y coordinates to match the number of entries in the datagrid. If the datagrid is 20 rows long, and there are 18 entries in the datagrid, then the graphics are all nicely aligned. But if there are 25 entries in the datagrid, then the graphics don't match up. Writing the code to match them up when the user scrolls seem unnecessarily hard. Adding a graphic object to the datagrid would be a nice way to resolve the issue.
What you need a custom renderer for you column. Flex Builder help has a lot of stuff on how to do this.
Essentially, your item renderer could be based on Canvas and (probably) based on some data from the current row draws some graphics.