title: combobox selectionchanged event doesn't update datagrid in Silverlight mvvm
body: <p>I am creating one project in silverlight 5 with mvvm.
   I have one combobox and one datagrid in one page. here wat's the problem means,"If i select any value in combobox it doesn't update the selected row to the datagrid.
   I bind three fields Fname, Sname, Dept in datagrid. and i bind all the dept value to<br>
   combobox.
   The Datagrid Structure is this,</p>
  
  <pre><code>____________________________
  Fname   | Sname   | Dept   |
  ---------------------------
  jeba    | Raj     |Tester  |
  ---------------------------
  Raj     | Kumar   |Engineer|
  ____________________________
  </code></pre>
  
  <p>The ComboBox Structure is this,</p>
  
  <pre><code>Tester
  Engineer
  </code></pre>
  
  <p>If i select the combobox SelectionChanged item is Tester means that record will be bind to Datagrid.</p>
  
  <p>I wrote the code below is,</p>
  
  <p>XAML Code is:</p>
  
  <pre><code>&lt;my:DataGrid x:Name="McDataGrid" ItemsSource="{Binding Employees,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" Margin="130,151,0,0" Height="99" VerticalAlignment="Top" RowBackground="#AA5D9324" AutoGenerateColumns="True" HorizontalAlignment="Left" Width="194" CanUserResizeColumns="True" HorizontalScrollBarVisibility="Disabled"&gt;
          &lt;/my:DataGrid&gt;
  
  &lt;ComboBox ItemsSource="{Binding Employees}"  DisplayMemberPath="Dept" SelectedItem="{Binding Names, Mode=TwoWay}" Margin="130,117,0,0" Height="26" VerticalAlignment="Top" HorizontalAlignment="Left" Width="120"&gt;
              &lt;i:Interaction.Triggers&gt;
                  &lt;i:EventTrigger EventName="SelectionChanged"&gt;
                      &lt;si:CallDataMethod Method="BindNew"/&gt;
                      &lt;si:SetProperty TargetName="LayoutRoot" PropertyName="Background" Value="PaleGoldenrod"/&gt;
                  &lt;/i:EventTrigger&gt;
              &lt;/i:Interaction.Triggers&gt;
  
          &lt;/ComboBox&gt;
  </code></pre>
  
  <p>ViewModel Class File Code: </p>
  
  <p>EmployeeListViewModel.cs</p>
  
  <pre><code>private Employee _Names;
      public Employee Names
      {
          get
          {
              return _Names;
          }
          set
          {
              _Names = value;
              RaisePropertyChanged("Names");
          }
      }
  public void BindNew()
           {
              Employee emplo = new Employee();
              Employees = Silverlight_MVVM.DataHelper.EmployeeDataHelper.EmployeeData();
              var semp = from emp in Employees where emp.Dept.Equals(Names.Dept) select emp;
  
              List&lt;Employee&gt; lt = new List&lt;Employee&gt;();
              lt = semp.ToList();
               lt.Count();
              int i;
              Employees.Clear();
              for (i = 0; i &lt; lt.Count(); i++)
              {
                  emplo.Fname = lt[0].Fname.ToString();
                  emplo.Sname = lt[0].Sname.ToString();
                  emplo.Dept = lt[0].Dept.ToString();
                  Employees.Add(emplo);
              }
            }
  </code></pre>
  
  <p>Here Employee.cs is a class file for Model:
  Employee.cs:</p>
  
  <pre><code>public class Employee: INotifyPropertyChanged 
      {
          //Constructor Creation Begins
  
          #region Constructor
          public Employee(string Fname = "", string Sname = "", string Dept = "")
          {
              _Fname = Fname;
              _Sname = Sname;
              _Dept = Dept;
          }
          #endregion
  
  
          #region Properties
          private string _Fname = string.Empty;
          public string Fname
          {
              get { return _Fname; }
              set 
              {
                  _Fname = value;
              }
          }
          private string _Sname = string.Empty;
          public string Sname
          {
              get { return _Sname; }
  
              set
              {
                  _Sname = value;
              }
          }
          private string _Dept = string.Empty;
          public string Dept
          {
              get { return _Dept; }
              set 
              { 
                  _Dept = value; 
              }
          }
          #endregion
   #region INotifyPropertyChanged
          // [field: NonSerialized]
          public event PropertyChangedEventHandler PropertyChanged;
  
          protected void RaisePropertyChanged(string propertyName)
          {
              var handler = PropertyChanged;
              if (handler != null)
              {
                  handler(this, new PropertyChangedEventArgs(propertyName));
              }
          }
          #endregion
  </code></pre>
  
  <p>In DataHelper Folder i have the following,</p>
  
  <pre><code>public static class EmployeeDataHelper
      {
          public static ObservableCollection&lt;Employee&gt; EmployeeData()
          {
  
              ObservableCollection&lt;Employee&gt; sampleEmployee = new ObservableCollection&lt;Employee&gt;();
              sampleEmployee.Add(new Employee("jas", "manickaraj", "Engineer"));
              sampleEmployee.Add(new Employee("raj", "Kumar", "Tester"));
              sampleEmployee.Add(new Employee("Jeba", "raj", "Developer"));
              return sampleEmployee;
          }
  }
  </code></pre>
  
  <p>Here wat is the problem means,
    If i select any item in the ComboBox that selected record will not bind to DataGrid..!
  Please help me to bind this. Thank u in Advance..</p>