title: Set DataGrid cell value from variables not in DataSource
body: <p>I have a <code>DataGrid</code> set with templates which get filled with a <code>List</code> in the <code>ViewModel</code>. The source is a custom class and so far every column takes a value from this class. However, I am trying to add a new column that (as an example) takes a value and doubles it. How can I go about this? This code has to be in the <code>ViewModel</code>, not the C# behind the view.</p>
  
  <pre><code>&lt;DataGridTemplateColumn Header="MyHeader" MaxWidth="250"&gt;
      &lt;!--Header Template--&gt;
      &lt;DataGridTemplateColumn.HeaderTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;TextBlock Text="{TemplateBinding Content}"/&gt;
          &lt;/DataTemplate&gt;
      &lt;/DataGridTemplateColumn.HeaderTemplate&gt;
      &lt;!--Cell Template--&gt;
      &lt;DataGridTemplateColumn.CellTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;TextBlock Text="{Binding MyBinding}"/&gt;
          &lt;/DataTemplate&gt;
      &lt;/DataGridTemplateColumn.CellTemplate&gt;
  &lt;/DataGridTemplateColumn&gt;
  </code></pre>
  
  <p><code>DataGrid</code> Definition (so <code>ItemSource</code>):</p>
  
  <pre><code>&lt;DataGrid ItemsSource="{Binding Calibrations, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="True" AutoGenerateColumns="False" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Visible"&gt;
  </code></pre>