I solved using a workaround....
Instead adding the selectionChange
eventListener, I used the mouseUp
and mouseDown
to check the time between click and release, and if the release time is less than click plus some dalay, I return the selection otherwise not...
<s:DataGrid id="grigliaData"
sortableColumns="false"
rowHeight="100"
interactionMode="touch"
mouseDown="grigliaData_mouseDownHandler(event)"
mouseUp="grigliaData_mouseUpHandler(event)"
top="230" left="5" right="5" bottom="50"
dataProvider="{listaEventi}" width="100%" height="100%">
//AS Code
private var _lastClickEvent:int;
protected function grigliaData_mouseDownHandler(event:MouseEvent):void
{
_lastClickEvent = getTimer();
}
protected function grigliaData_mouseUpHandler(event:MouseEvent):void
{
if (getTimer() < _lastClickEvent + 200) // 200 = Dalay
{
// return selectedIndex
}
}
EDIT:
I also added the check on mouseX and mouseY position, now the grid dispatch the selectionChange if the time before release and the change of position is less that the default dalay (time/pixel)...