WPF Command parameter
I am creating a user control in MVVM. I have a datagrid in my user control. When i click a button in the user control i want to pass the parameters as selected items in the datagrid. I have declared the two controls(datagrid and button in two different data template) now when i use command parameter for the button and specify the element name and path(as property in datagrid - selectedItems).. i am getting null in the viewmodel command ... I have two question
- do i need to开发者_C百科 bind the command parameter in a different way,? when my data grid in different datatemplate please confirm
- how to access collection of selected rows in datagrid using Relaycommand.. pl provide code to do that.. im stuck when declaring and defining that type of command
精彩评论