如何从 WPF DataGrid 的单元格中读取值? [英] How to read value from a Cell from a WPF DataGrid?
问题描述
如何从 WPF DataGrid 读取单元格值?
How to read a cell value form a WPF DataGrid?
我在网上搜索并尝试任何可能的组合,但没有任何效果:
I search online and try any possible combination and nothing works:
Datagrid.Cells[..]、DataGrid.Items.Cells[..]、DataGrid.Rows..、DataGrid.Items.Row..没有任何作用,我找不到它是 MSDN 或者我不明白.我只需要从 DataGrid 中的一个单元格中读取一个值就这么简单.
Datagrid.Cells[..], DataGrid.Items.Cells[..], DataGrid.Rows.., DataGrid.Items.Row.. nothing works, I can't find it is MSDN or I don't understand it. I just need to read a value off a cell in DataGrid that simple.
怎么做?
推荐答案
检查这个
http://social.msdn.microsoft.com/Forums/en/wpf/thread/74332b78-6bfd-4ac9-af85-dfd9bec87a29
http://wpfadventures.wordpress.com/2008/12/02/wpf-datagrid-detecting-clicked-cell-and-row/
WPF 工具包 DataGrid SelectionChanged 获取单元格值
这篇关于如何从 WPF DataGrid 的单元格中读取值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!