title: WPF how to access other variable from same viewmodel?
body: <p>To display items on <code>Telerik:RadGridView</code> usually I use <code>DataContext="{Binding [someViewModel]}"</code> and <code>ItemSource="{Binding objectList, Mode=TwoWay}"</code>.</p>
  
  <p>and for my column I'll access the <code>objectfield</code>. The overall picture will be something like below:</p>
  
  <pre><code>&lt;telerik:RadGridView DataContext="{Binding [someViewModel]}" 
       ItemSource="{Binding objectList, Mode=TwoWay}"&gt;
  
      &lt;telerik:RadGridView.Columns&gt;
              &lt;telerik:GridViewDataColumn&gt;
                  &lt;telerik:GridViewDataColumn.CellTemplate&gt;
                      &lt;DataTemplate&gt;
                          &lt;CheckBox IsEnabled="{Binding enabledVar}" 
                              IsChecked="{Binding isChecked, Mode=Twoway}"
                      &lt;/DataTemplate&gt;
                  &lt;/telerik:GridViewDataColumn.CellTemplate&gt;
  
              &lt;/telerik:GridViewDataColumn&gt;  
      &lt;/telerik:RadGridView.Columns&gt;
  
  &lt;/telerik:RadGridView&gt;
  </code></pre>
  
  <p>Imagine there will be 10 items in <code>objectList</code>. Each of the item in <code>objectList</code> will have a variable <code>isChecked</code> which to manipulate the checkbox <code>IsChecked</code> property. </p>
  
  <p>I have another variable in the same viewmodel named <code>enabledVar</code> which to control the ten checkbox <code>IsEnabled</code> property. <code>enabledVar</code> is not part of the <code>objectList</code> but I couldn't get the value. May I know how to handle such case?</p>
  
  <p><strong>Updates:</strong></p>
  
  <p>I've found some new direction but not sure if it helps.</p>
  
  <pre><code>&lt;CheckBox IsEnabled="{Binding enabledVar,
       RelativeSource={RelativeSource Mode=FindAncestor, 
       AncestorType=telerik:RadGridView}}"
  </code></pre>
  
  <p>but then of course, still failed.</p>
  
  <p>Any helps would be very much appreciated.</p>