如何验证datagrid? [英] How to validate datagrid?
本文介绍了如何验证datagrid?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个可编辑的数据网格,我可以用它保存和更新数据
现在我想逐个单元验证datagrid单元格
我尝试过:
我创建了一个带有数据注释的验证类并映射它与实体对象...但我认为我做错了方式
我正在通过互联网阅读很多东西,但不是能够理解这个概念
因此,如果有人能说出一个方法,只需要很少的解释就可以了。
或任何好的链接也会有帮助
TIA
解决方案
这里有两个文章来帮助你入门:
* 如何:使用DataGrid控件实现验证 [ ^ ]
* WPF DataGrid中的验证 [ ^ ]
您可以找到更多使用此Google搜索: wpf datagrid编辑验证 - Google搜索 [ ^
I have a editable datagrid, I can save and update the data with it
Now I want to validate the datagrid cell by cell
What I have tried:
I have created a validate class with data annotation and mapped it with entity object... but I think I am doing to wrong way
I am reading lot of things over internet, but not able to understand the concept
So if anyone could tell a way to do it with little explanation will be great.
Or any good links will also help
TIA
解决方案
Here are a couple of articles to get you started:
* How to: Implement Validation with the DataGrid Control[^]
* Validation in a WPF DataGrid[^]
You can find more using this Google Search: wpf datagrid edit validation - Google Search[^]
这篇关于如何验证datagrid?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文