如何在WPF DataGrid中执行单击复选框? [英] How to perform Single click checkbox selection in WPF DataGrid?

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

问题描述

我有一个DataGrid,第一列为文本列,第二列为CheckBox列。我想要的是,如果我单击复选框。它应该被检查。


但是,需要两次点击才能选择,首先单击该单元格被选中,第二次单击该复选框被检查。注意:我正在使用WPF 4.0


$ b $($)
$ b

编辑:
DataGrid中的列是AutoGenerated。

解决方案

是3.5sp1,我知道 - 但它应该工作在4.0: Vinsibal


I have a DataGrid with first column as text column and second column as CheckBox column. What I want is, if I click the check box. It should get checked.

But, it takes two click to get selected, for first click the cell is getting selected, for the second clicks the check box is getting checked. How to make the check box to get checked/unchecked with a single click.

Note:I'm using WPF 4.0

Edit: Columns in the DataGrid are AutoGenerated.

解决方案

This is for 3.5sp1, I know - but it should work under 4.0: Vinsibal.

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

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