[flexcoders] Re: Datagrid - disable cell events?

2008-09-12 Thread horizens
I'm building an mp3 player and using the datagrid for the playlist. If
a user selects a row in the datagrid, the corresponding track plays.
If an mp3 is out of date or the url no longer works for a given track,
I'd like to still show the track in the datagrid, but prevent the
track from being clicked. I've been searching for a way to disable the
click event for certain cells. I've successfully used itemRenderers to
visually show that the user that the track is invalid by changing the
background color of the cells, but cannot figure out the disabling aspect.



RE: [flexcoders] Re: Datagrid - disable cell events?

2008-09-12 Thread Alex Harui
Well, are you using the ITEM_CLICK event?  If so, you can override 
dispatchEvent and look for it to be dispatched and not dispatch it.  You can 
also listen for the event from the systemManager at a high priority in capture 
phase and call stopImmediatePropagation before it gets too far

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of horizens
Sent: Friday, September 12, 2008 3:29 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Datagrid - disable cell events?


I'm building an mp3 player and using the datagrid for the playlist. If
a user selects a row in the datagrid, the corresponding track plays.
If an mp3 is out of date or the url no longer works for a given track,
I'd like to still show the track in the datagrid, but prevent the
track from being clicked. I've been searching for a way to disable the
click event for certain cells. I've successfully used itemRenderers to
visually show that the user that the track is invalid by changing the
background color of the cells, but cannot figure out the disabling aspect.