How can I update my DataGrid when a user makes a selection in the ComboBox? <p>Here's my ComboBox: </p> <pre><code>&lt;ComboBox HorizontalAlignment="Left" Margin="125,110,0,0" VerticalAlignment="Top" Width="120" DisplayMemberPath="lot_number" ItemsSource="{Binding LotNumList}" RenderTransformOrigin="0.583,2" Height="18" /&gt; </code></pre> <p>Here's a DataGrid that I want to update the values to:</p> <pre><code>&lt;DataGrid HorizontalAlignment="Left" Margin="228,177,0,0" VerticalAlignment="Top" Height="292" Width="617" ItemsSource="{Binding ComponentsList}" AutoGenerateColumns="False"&gt; &lt;DataGrid.Columns&gt; &lt;DataGridTextColumn Header="Component" Binding="{Binding component}" CanUserResize="False"/&gt; &lt;DataGridTextColumn Header="Control" Binding="{Binding aControl}" CanUserResize="False"/&gt; &lt;DataGridTextColumn Header="Reference" Binding="{Binding cal_ref}" CanUserResize="False" /&gt; &lt;DataGridTextColumn Header="Family" Binding="{Binding family}" CanUserResize="False"/&gt; &lt;DataGridTextColumn Header="Id" Binding="{Binding componentId }" CanUserResize="False"/&gt; &lt;/DataGrid.Columns&gt; </code></pre> <p>Here's how I'm grabbing data from db to populate the ComboBox:</p> <pre><code>//Grabs the lot_number column from db that is distinct var lotNum = db.LotInformation.GroupBy(i =&gt; i.lot_number) .Select(group =&gt; group.FirstOrDefault()); //Loops through the lot numbers column in db and converts to list foreach (var item in lotNum) { Console.WriteLine(item.lot_number); } LotNumList = lotNum.ToList(); </code></pre> <p>Now I am wondering how do I connect my ComboBox so that when I select a value in the ComboBox... then the DataGrid gets updated based on the value of the selection in the ComboBox. </p> <p>I tried something like this: </p> <pre><code>private void UpdateExistLotList(string LotNumber) { using (var db = new DDataContext()) { //Grabs the lot_number column from db that is distinct var ExistLot = db.LotInformation.First(l =&gt; l.lot_number.Equals(LotNumber)); } } </code></pre> <p>Calling the method in my lot number list property but it doesn't get called or just doesn't work. I'm not sure what I'm doing wrong. Any ideas?</p> <p>EDIT: </p> <p>Properties: </p> <pre><code>public List&lt;Components&gt; ComponentsList { get { return components; } set { components = value; RaisePropertyChanged("ComponentsList"); } } public string LotNumber { get { return lotNumber; } set { lotNumber = value; RaisePropertyChanged("LotNumber"); } } public List&lt;LotInformation&gt; LotNumList { get { return lotNumList; } set { lotNumList = value; RaisePropertyChanged("LotNumList"); UpdateExistLotList(LotNumber); } } </code></pre> <p>Here's where LotNumber is declared (I take the deserialized value of lot number from memory and assign it to LotNumber): </p> <pre><code>public void DeSerializationXML(string filePath) { XmlRootAttribute xRoot = new XmlRootAttribute(); xRoot.ElementName = "lot_information"; xRoot.IsNullable = false; // Create an instance of lotinformation class. var lot = new LotInformation(); // Create an instance of stream writer. TextReader txtReader = new StreamReader(filePath); // Create and instance of XmlSerializer class. XmlSerializer xmlSerializer = new XmlSerializer(typeof(LotInformation), xRoot); // DeSerialize from the StreamReader lot = (LotInformation)xmlSerializer.Deserialize(txtReader); // Close the stream reader txtReader.Close(); //Storing deserialized strings to db using (var db = new DMIDataContext()) { LotInformation newLot = new LotInformation(); if (newLot != null) { newLot.Id = lot.Id; newLot.lot_number = lot.lot_number; newLot.exp_date = lot.exp_date; LotNumber = newLot.lot_number; ExpirationDate = newLot.exp_date.ToString(); //Grabs the lot_number column from db that is distinct var lotNum = db.LotInformation.GroupBy(i =&gt; i.lot_number).Select(group =&gt; group.FirstOrDefault()); //Loops through the lot numbers column in db and converts to list foreach (var item in lotNum) { Console.WriteLine(item.lot_number); } LotNumList = lotNum.ToList(); foreach (Components comp in lot.Components) { newLot.Components.Add(comp); } ComponentsList = newLot.Components; foreach (Families fam in lot.Families) { newLot.Families.Add(fam); } FamiliesList = newLot.Families; try { db.LotInformation.Add(newLot); db.SaveChanges(); Console.WriteLine("successfully"); } catch { //TODO: Add a Dialog Here } } } </code></pre>