I want to add buttons from a list, depending of how many items there are in the list. It works perfectly when I do it like this:
The thing is they have no click events, I want each button to have an event that makes the user navigate to the right page depending on which button is clicked.
I'm trying to do it this way but it doesn't work:
Any ideas of the right way to do it if this is totally wrong?

