title: This type of CollectionView does not support changes to its SourceCollection from a thread different from the Dispatcher thread
body: <p>I have a DataGrid which is populating data from ViewModel by asynchronous method.My DataGrid is :</p>
  
  <pre><code>&lt;DataGrid ItemsSource="{Binding MatchObsCollection}"  x:Name="dataGridParent" 
                        Style="{StaticResource EfesDataGridStyle}" 
                        HorizontalGridLinesBrush="#DADADA" VerticalGridLinesBrush="#DADADA" Cursor="Hand" AutoGenerateColumns="False" 
                        RowDetailsVisibilityMode="Visible"  &gt;
  </code></pre>
  
  <p>I am using <a href="http://www.amazedsaint.com/2010/10/asynchronous-delegate-command-for-your.html" rel="noreferrer">http://www.amazedsaint.com/2010/10/asynchronous-delegate-command-for-your.html</a> to implement asynchronous way in my viewmodel.</p>
  
  <p>Here is my viewmodel code:</p>
  
  <pre><code>public class MainWindowViewModel:WorkspaceViewModel,INotifyCollectionChanged
      {        
  
          MatchBLL matchBLL = new MatchBLL();
          EfesBetServiceReference.EfesBetClient proxy = new EfesBetClient();
  
          public ICommand DoSomethingCommand { get; set; }
          public MainWindowViewModel()
          {
              DoSomethingCommand = new AsyncDelegateCommand(
                  () =&gt; Load(), null, null,
                  (ex) =&gt; Debug.WriteLine(ex.Message));           
              _matchObsCollection = new ObservableCollection&lt;EfesBet.DataContract.GetMatchDetailsDC&gt;();                
  
          }       
  
          List&lt;EfesBet.DataContract.GetMatchDetailsDC&gt; matchList;
          ObservableCollection&lt;EfesBet.DataContract.GetMatchDetailsDC&gt; _matchObsCollection;
  
          public ObservableCollection&lt;EfesBet.DataContract.GetMatchDetailsDC&gt; MatchObsCollection
          {
              get { return _matchObsCollection; }
              set
              {
                  _matchObsCollection = value;
                  OnPropertyChanged("MatchObsCollection");
              }
          }        
          //
          public void Load()
          {            
              matchList = new List&lt;GetMatchDetailsDC&gt;();
              matchList = proxy.GetMatch().ToList();
  
              foreach (EfesBet.DataContract.GetMatchDetailsDC match in matchList)
              {
                  _matchObsCollection.Add(match);
              }
  
          }
  </code></pre>
  
  <p>As you can see in my Load() method in my ViewModel first I am getting matchList (which is a list of a DataContract Class) from my Service.Then by foreach loop I am inserting my matchList items to my _matchObsCollection(which is an ObservableCollection of DataContract Class)).Now here I am getting the above error (as I shown in Title) "This type of CollectionView does not support changes to its SourceCollection from a thread different from the Dispatcher thread" 
  <img src="https://i.stack.imgur.com/zHgtd.jpg" alt="enter image description here"></p>
  
  <p>Can anyone suggest me any solution.Moreover if possible I would like to know how to bind my DataGrid in View and also refresh it asynchronously if any better way is there.</p>