views:

8

answers:

1

I have code like this

<GridViewColumn Header="Status" Width="75" DisplayMemberBinding="{Binding Path=TimesheetStatus}"/>
        <GridViewColumn Header="Reviewed?" Width="70">
          <GridViewColumn.CellTemplate>
            <DataTemplate>
              <CheckBox Margin="1,2,1,0" IsEnabled="{Binding Path=EnableReview}" IsChecked="{Binding Path=IsReviewed}" Checked="reviewedCheckBox_Checked"/>
            </DataTemplate>
          </GridViewColumn.CellTemplate>
        </GridViewColumn>

I am able to access the displaymemberbinding property (TimeSheetStatus) for Gridviewcolumn Status. But I want to know how can I access the IsChecked Binding property (IsReviewed) from the "Reviewed?" Gridviewcolumn. Any help?

A: 

because you are using a data template, there is no nice way to get there, but if you only wants to get to this specific column binding you can try debug the application and look at the column in debug view till you get the to checkbox, write this path in your code and use the BindingOperations helper class to get the binding of the relevant property in your check box

Chen Kinnrot