ProGallery Item Index Not Supported OnClick?

Hi all experts,
I need to trigger a function when ProGallery Item is clicked, and display collection data related to the Clicked Image. To do so, I tried (unsuccessfully) to get the clicked-item index and relate it to my dataset.
I would appreciate any help: How to identify the index of a clicked image-item in ProGallery .

Here is what I tried and failed:
I tried creating onItemClicked and onCurrentItemChanged events, thinking to extract the itemIndex and related it to my collection.
However, onCurrentItemChanged is not supported for ProGallery, and while onItemClicked is supported ,the event.itemIndex is not.
My second approach was to extract the item.src upon onItemClicked event and find the index by relating it to the src’s contained in $w(myGallery).items, BUT the item given by the onItemClicked event contains uri and not src .

the following code works perfect but does not provide a solution to identify the index:

Thanks,
Ofer

Hi Ofer,

Sounds like you are going to be beating your head against a wall trying to get what you want from a gallery linked to a dataset. As you know, only certain of the gallery types support more functionality, and then it might not be enough for your purposes. You might try populating it in code using the items property . It will take some coding finesse, but you could have an array in memory that has the needed collection data that you can reference based on the image chosen.

Thanks for replying.
I ended up catching the image title+description from the click event, and reference it as a key to title+description memory array loaded from the collection. Works fine.