title: WPF Datagrid Grouping - items with binding converter not updating dynamically
body: <p>Am new to WPF and using the datagrid control to group items, data is sourced from a java message Q and items are added dynamically as they arrive.</p>
  
  <p>Am using GroupStyle to display the Grouping name, Items Count and a custom converter that reads displays the executed quantity.</p>
  
  <p>The issue I have is that the item count updates as and when items arrive but the custom converter class is not invoked.</p>
  
  <pre><code>&lt;DataGrid.GroupStyle&gt;
      ...
   &lt;TextBlock.Text&gt;
          &lt;MultiBinding StringFormat="{}{0}, Count: {1:#0}, Executed Qty: {2}"&gt;
              &lt;Binding Path="Name" /&gt;
              &lt;Binding Path="ItemCount" /&gt;
              &lt;Binding Path="Items" Converter="{StaticResource convertToExecutedQty}" /&gt;
          &lt;/MultiBinding&gt;
  &lt;/TextBlock.Text&gt;
  .....
  &lt;/DataGrid.GroupStyle&gt;
  </code></pre>
  
  <p>And in the Converter class:</p>
  
  <pre><code>public class ConvertToExecutedQty : IValueConverter
  {
      public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
      {
          if (value != null &amp;&amp; value is IEnumerable&lt;Object&gt;)
          {
              IEnumerable&lt;TickOrderViewModel&gt; orders = ((IEnumerable&lt;object&gt;) value).GetBaseElements&lt;TickOrderViewModel&gt;();
  
  
              if (orders.Count() &gt; 0)
              {
                  var BuyQty = ( from n
                                in orders
                                 where n.side.ToUpperInvariant() == "BUY"
                                 select n.executed_qty ).Sum();
  
                  var SellQty = ( from n
                                in orders
                                 where n.side.ToUpperInvariant() == "SELL"
                                 select n.executed_qty ).Sum();
  
                  return BuyQty - SellQty;
              }
          }
  
          return null;
      }
  </code></pre>
  
  <p>In the above converter, when the tab loads, "orders" count is 1 when there are 2 items that were loaded one after the other as they were read from the MQ.</p>
  
  <p>Ex: I have 2 rows with SELL as 1 and SELL as BUY as 1
  Initially on load the collection sees only 1 row, and the executed qty displays -3.</p>
  
  <p>When i switch tabs, then orders now have 2 items and the Exe qty becomes the correct value of -2</p>
  
  <p>any ideas pls?</p>