Select ID when long click on item of a listview that is using a dictionary

Your example @pepocero it will work.
But, why doesn’t the first block @Miguel_Silva posted work ?