title: WPF Command parameter
body: <p>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 </p>
  
  <ol>
  <li>do i need to bind the command parameter in a different way,? when my data grid in different datatemplate please confirm</li>
  <li>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 </li>
  </ol>