0

I have a GridView which is bound to a List of Objects X in the ViewModel, I want to Command bind to each button, so that in when I click the button i get info from the selected X object and view it somewhere else.

Simply as that. I can't seem to find a reference to the selected GridView item that's bound to that particular button from the ViewModel codeBehind.

Charles
  • 50,943
  • 13
  • 104
  • 142
smohamed
  • 3,234
  • 4
  • 32
  • 57

1 Answers1

0

There is no binding path that you could 'resolve' from the Button down to the selected GridView item.

However if you check the SelectedItem property (which should be bound to a property on the viewmodel as well) from your command event handler you will have the reference to the item you are clicking the button in.

Alex
  • 1,110
  • 8
  • 15