-2

How can I collect all the row indices that I selected in a spark datagrid using shift key and I want to collect them in an arraycollection.

2 Answers 2

1

Use the selectedIndices property. It will give a Vector; which is like a Typed Array. If you really need an ArrayCollection you can write a conversion routine. If you're using Apache Flex, there is also a VectorCollection class you could use.

1
var yourAC : ArrayCollection = new ArrayCollection();
for each (var elem:Object in yourDataGrid.selectedIndices) {
    yourAC.addItem(elem);
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.