title: How to set a value in a rowheadertemplate of a datagrid?
body: <p>I'm trying to work out a rowheadertemplate with a binding, but the binding doesn't work. This is what i have so far:</p>
  
  <pre><code>       &lt;DataGrid Name="dgFruit" ItemsSource="{Binding}" AutoGenerateColumns="false"&gt;&lt;!--ItemTemplate="{StaticResource datagrid}"--&gt;
              &lt;DataGrid.RowHeaderTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;Label Content="{Binding Path=Number, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/&gt;
                  &lt;/DataTemplate&gt;
              &lt;/DataGrid.RowHeaderTemplate&gt;
              &lt;DataGrid.Columns&gt;
                  &lt;DataGridTextColumn Binding="{Binding Path=Name}" Header="Name"/&gt;
                  &lt;DataGridTextColumn Binding="{Binding Path=Color}" Header="Color"/&gt;
                  &lt;DataGridCheckBoxColumn Binding="{Binding Path=Mjummy}" Header="Mjummy"/&gt;
              &lt;/DataGrid.Columns&gt;
          &lt;/DataGrid&gt;
  </code></pre>
  
  <p>I'm getting row headers if i set the content to a value, like "45", but when i try to bind, the rowheaders aren't shown anymore. I'm trying to bind to a property from the same class as the values in the columns.</p>
  
  <p>So, how can i retrieve the Number value from my list?</p>
  
  <p>Thanks in advance</p>