Flex - prevent dragging for certain items

Posted by Tom on Stack Overflow See other posts from Stack Overflow or by Tom
Published on 2010-03-22T16:19:55Z Indexed on 2010/03/22 17:01 UTC
Read the original article Hit count: 360

Filed under:
|
|

Hi troops,

how would you prevent dragging for some items of your List or DataGrid?

Let's say I had a list with two items: 'Tom' and 'Jerry'. Only 'Tom' should be dragable, not 'Jerry'.

Ideally I had a 'isDragEnabled(item:Object):Boolean' function, which is being queried by the drag source.

My difficulties start with the fact that the 'dragStart' event handler has a null value for the dragSource, so right from the start I find it hard to find out what the drag-start is about..

Thanks in advance!

PS There have been a few discussions on preventing or canceling a drop, but I haven't seen much about preventing the drag start, hence this question.

© Stack Overflow or respective owner

Related posts about flex

Related posts about drag-and-drop