WPF中带有复选框的datagrid [英] datagrid with checkbox in wpf

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

问题描述



我正在使用带复选框的datagrid.我已经绑定DataGrid的选择项属性时,选择任何项目,这将选中该复选框.

我面临的问题是,当用户单击复选框而不是datagrid中的任何项目时,第一个选定的项目属性被选中并被选中,后来复选框属性被选中而未被选中.

您能为我提供任何解决方案吗?

在此先感谢

问候
Govardhan

Hi,

I am using a datagrid with checkbox. I have binded the selected Item property of the datagrid which will check the checkbox when any item is selected.

Issue i am facing is when user click on checkbox rather than any item in datagrid, first selected item property is getting the hit and making it checked and later checkbox property is getting hit which is making it unchecked.

Can you provide me any solution for it.

Thanks in advance

Regards
Govardhan

推荐答案

请参考:

DataGrid提示&技巧:单击编辑 [ ^ ]
在WPF Datagrid中选择的复选框 [ ^ ]

在WPF DataGrid中选择所有复选框的C#代码 [ ^ ]
如何在Datagrid WPF c#中添加复选框> [ ^ ]
Please refer:

DataGrid Tips & Tricks: Single-Click Editing[^]
Checkbox to Select in WPF Datagrid[^]

c# code for select all checkbox in wpf datagrid[^]
How to Add Check Box in Datagrid WPF c#[^]


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

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