Does anybody has idea how to get datagrid column rollover effect? For example, I want to change bckg color of 3rd column but it doesn?t work: grid.getColumnAt(2).setStyle("rollOverColor", 0xFF3300); Any help will be apreciated.
You want to change the background color of the 3rd column when you roll over an item? If so, the way you are trying is not correct. First, you need to have a function like: see attached code But when you look at the LiveDocs, there seems to be a problem with this. It doesn't work. Some managed to get it work by adding the code IN the datagrid. (select the datagrid on the stage, then write the code). This is not recommended, but it seems to work. Not on my pc (nor mac) though. Maybe it will in Flash 9? NB: the rollOverColor applies to the whole line. Not only one column. I don't know if this is even possible to have a different rollOverColor per column. But you just wanted to change the background when rolling over, right? grid.onRollOver = function():Void { this.getColumnAt(2).setStyle('backgroundColor', 0xFF3300); }
I made a new message because I tried the code out... It's a total mess. 1: There is no rollovercolor anymore !!! ???? 2: the background has changed, but the whole column, not only the rolled-over item... In fact, it is normal, because it says grid.onRollOver. So you should seek a little bit to get something like grid."pointedIndex".onRollOver blabla I dont know the function for that but with the livedocs, you should (maybe) find it. Hope this helped you a little bit, even it is not the exact answer? grid.onRollOver = function():Void { this.getColumnAt(2).setStyle('backgroundColor', 0xFF3300); }
Don't see what you're looking for? Try a search.
|