如何在WPF中检查datagrid中的复选框值 [英] How to check checkbox value in datagrid in WPF

查看:307
本文介绍了如何在WPF中检查datagrid中的复选框值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在WPF中的datagrid中有复选框。如果我点击复选框,该复选框值将为true。如何在后面的代码中访问复选框值?

I have checkbox in datagrid in WPF. If I clicked on the checkbox, that checkbox value will be true. How can I access checkbox value in code behind?

推荐答案

Codebehind不是处理复选框的最佳方式。

尝试绑定 - < a href =http://www.scottlogic.com/blog/2008/11/26/multiselect-datagrid-with-checkboxes.html> http://www.scottlogic.com/blog/2008/11/26 /multiselect-datagrid-with-checkboxes.html [ ^ ]。
Codebehind is not the best way to handle the checkbox.
Try binding - http://www.scottlogic.com/blog/2008/11/26/multiselect-datagrid-with-checkboxes.html[^].


这篇关于如何在WPF中检查datagrid中的复选框值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆