This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new 62ad75c fix itemclick event. Should fix #744
62ad75c is described below
commit 62ad75cb92527d45e81654dda2c64432f0d63190
Author: Alex Harui <[email protected]>
AuthorDate: Tue Mar 3 13:37:33 2020 -0800
fix itemclick event. Should fix #744
---
.../AdvancedDataGridSingleSelectionMouseController.as | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/advancedDataGridClasses/AdvancedDataGridSingleSelectionMouseController.as
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/advancedDataGridClasses/AdvancedDataGridSingleSelectionMouseController.as
index 3c2f719..f1c1521 100644
---
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/advancedDataGridClasses/AdvancedDataGridSingleSelectionMouseController.as
+++
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/advancedDataGridClasses/AdvancedDataGridSingleSelectionMouseController.as
@@ -19,7 +19,8 @@
package mx.controls.advancedDataGridClasses
{
import mx.controls.AdvancedDataGrid;
- import mx.events.ItemClickEvent;
+ import mx.controls.beads.AdvancedDataGridView;
+ import mx.events.ListEvent;
import org.apache.royale.collections.ITreeData;
import org.apache.royale.core.ISelectionModel;
@@ -88,8 +89,12 @@ package mx.controls.advancedDataGridClasses
((_strand as AdvancedDataGridColumnList).model as
ISelectionModel).selectedItem = node;
IEventDispatcher(_strand).dispatchEvent(new Event("change"));
- var newEvent:ItemClickEvent = new
ItemClickEvent(ItemClickEvent.ITEM_CLICK);
- newEvent.index = event.index;
+ var newEvent:ListEvent = new ListEvent(ListEvent.ITEM_CLICK);
+ newEvent.rowIndex = event.index;
+ var lists:Array = (adg.view as
AdvancedDataGridView).columnLists;
+ for (var i:int = 0; i < lists.length; i++)
+ if (lists[i] == _strand) break;
+ newEvent.columnIndex = i;
IEventDispatcher(_strand).dispatchEvent(newEvent);
}
}