开发者

Access control binding information from GridViewColumn

I have code like this

<GridViewColumn Header="Status" Width="75" DisplayMemberBinding="{Binding Path=TimesheetStatus}"/>
        <GridV开发者_StackOverflowiewColumn 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?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜