Try using the mouseFocusChange event.  I've used it a few times for
deselecting items in a list when anywhere else is clicked.  For your
needs, you may have to adapt it but give it a try.

I have a blog post about it at:

http://my.opera.com/darylducharme/blog/2007/12/14/hidden-gems-mousefocus\
change

--- In flexcoders@yahoogroups.com, "whatabrain" <[EMAIL PROTECTED]> wrote:
>
> I have an AdvancedDataGrid which has a few rows, and lots of empty
> space. When I click on the empty space, I want all the rows to be
> deselected. How do I detect that I've clicked in an empty space?
>
> I tried using grid.getObjectsUnderPoint() in the "click" event, but
the
> results aren't very useful. I guess I could depend on the fact that
> there are always more than three objects when I click on a real row,
> and exactly three when I click on empty space, but that seems like a
> bad thing to depend on. Who knows what future versions of Flex will
add
> to the list?
>
> There must be a better way!
>
> Thanks.
>


Reply via email to