View Full Version : Disable DataGrid itemRollOver ???
09-17-2004, 09:28 PM
Does anyone know how to disable the datagrid item rollover? I dont want the event to fire at all.
09-20-2004, 07:06 PM
It's a built in property, just use grid._enabled = false;
09-24-2004, 02:06 PM
Thanks for your reply. Your suggestion does not seem to work ...
myGrid._enabled = false;
I want the kill the event, or listener, that highlights the rows on rollOver. I assume it is 'itemRollOver' which is an event that the DataGrid inherits from the List class. I did not see a property/policy for this in the DataGrid anywhere. Any other ideas?
09-24-2004, 02:21 PM
09-27-2004, 07:17 PM
this is the solution i was looking for! Where are all these undocumented properties listed, how did you find out about them?
09-30-2004, 01:51 AM
It isn't that they are undocumented, it is that they are internal methods and properties that were never meant to be exploited. The datagrid serves the purpose of displaying tabular data and many people have extended it to do what they need it to. The only reason many people know about all of this is that Macromedia provided all the source code for the UI components. Try findoing answers on exploiting Data component properties and methods and no one will have any anwers.
10-01-2004, 01:56 PM
Thanks for the tip. Now i know where to look.
10-12-2004, 05:17 PM
it seems churlish to disagree with Annexion as he has posted so many posts, and I so few, but I gonna do it anyway.
It's not undocumented, or really part of the source as such. The datagrid inherits all the capabilities of the List class and useRollover is one of the customisable attributes of the list class. I just tried it and it worked.
Inheritence is a powerful thing. It allows you (or macromedia) to build a stack of functionality in classes without writing the same code many times. It's a bit hard to use because you have to understand how it works and how to follow the inheritence back to its source. If you look at the documentation for the Datagrid class, it tells you about its inheritence right there. It's even clickable! You can use any of those attributes, although expect to do some fiddling about to make it work.
10-13-2004, 01:49 AM
You're absolutely right. Let me save face here by saying that I remember having to dig into the datagrid to find out how to disable another feature. Seeing this prompted me to remember doing that, although I remembered incorrectly what feature it was that I did it to.
Excellent post, by the way. We need more people like you around here.
10-14-2004, 03:00 PM
That seems to do the trick for me.
11-10-2005, 01:36 PM
I know this thread was quite a while ago now, but I am trying to do something similar to what annexion mentioned about digging into the DataGrid class to alter features.
I need to alter the rollOver feature on a DataGrid and couldn't figure out any other way to do it other than to go into the actual class definition for DataGrid and the SelectableRow class which it inherits from List. Basically, I want to alter the rollOver highlight effect to make it fade in and fade out more elegantly. I noticed code for the selection effect in the SelectableRow class, but couldn't work out the rollOver bit.
Any help on how to do this would be much appreciated!
11-15-2005, 08:22 AM
Just to let you know that I solved this, in case anyone else wants to do the same. Unfortunately I couldn't work out how to alter the underlying classes, so instead opted for a different approach.
Basically I created a transparent datagrid, with dynamically created movieclips behind which I applied tweens to on the fly depending on which row of the datagrid was rolled over. Let me know if anyone wants the code to do this. Took a lot of working out but worth it in the end.
vBulletin® v3.8.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.