Groups | Blog | Home
all groups > flash data integration > january 2006 >

flash data integration : Datagrid column rollover, how?


Maranz
1/4/2006 9:14:54 PM
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.
mae ling
4/24/2007 3:37:21 PM
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);
}
mae ling
4/24/2007 3:55:39 PM
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);
}
AddThis Social Bookmark Button