title: RadGrid Binding to a List
body: <p>XAML RadGrid</p>
  
  <pre><code>&lt;telerik:RadGridView d:DataContext="{d:DesignInstance {x:Type local:A}}" Name="myGridView" Grid.Column="2" ItemsSource="{Binding Path=MyList}"  Margin="7,7,7,2" IsFilteringAllowed="False" ShowColumnHeaders="True" AutoGenerateColumns="True" /&gt;
  </code></pre>
  
  <p>C# Code</p>
  
  <pre><code>Class A:INotifyPropertyChanged
  {
   private List&lt;Fields&gt; MyList;
   public event PropertyChangedEventHandler PropertyChanged;
  public List&lt;Fields&gt; _theList
  {
    get
    {
      if (MyList == null)
      {
        MyList = new List&lt;Fields&gt;();
      }
      return MyList;
    }
    set
    {
      if (MyList != value)
      {
        MyList = value;
        PropertyChanged(this, new PropertyChangedEventArgs("_theList"));
      }
    }
  }    
  }
  </code></pre>
  
  <p>When the items in MyList change dynamically, the radgridview does not update automatically, It works if I reset the Itemssource in the code:</p>
  
  <pre><code>mygridview.Itemssource = Null;
  mygridview.Itemssource = MyList;
  </code></pre>
  
  <p>I have to reset the itemssource everytime in the code after the MyList changes. Why GridView does not update automatically when contents of MyList change?
  Also, During design time it shows me appropriate column headers with no data in the columns because the list is empty. But when I run the application, column headers disappear and no data is displayed in the radgrid when contents of MyList change dynamically.</p>