title: Twoway binding crashes when I change datacontext
body: <p>I am using twoway binding to dynamically change the color of one of my user controls and to set the initial selected color. It's structured as the following (way simplified):</p>
  
  <pre><code>&lt;RadGridView x:Name="T" ItemsSource="{Binding storage, Mode=OneWay}"&gt;
      &lt;GridViewColumn&gt;
          &lt;GridViewColumn.Template&gt;
              &lt;ColorPicker SelectedColor="{Binding Color, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /&gt;
          &lt;/...&gt;
      &lt;/...&gt;
  &lt;/...&gt;
  </code></pre>
  
  <p>And the associated C# code:</p>
  
  <pre><code>void func(object sender) {
      this.DataContext = sender;
  }
  </code></pre>
  
  <p>I am getting a nullpointer exception when I try to change the DataContext of the GridView IF AND ONLY IF the GridView has elements in it. Is there a way to get around changing the source of a gridview that has twoway bindings?</p>
  
  <p>Best,
  Jin</p>