简体   繁体   English

如何从DataGrid单元格获取文本C#WPF

[英]How to get the Text from a DataGrid cell c# wpf

我要复制的内容

Hi, I have to create this on Visual Studio with c# on application WPF. 嗨,我必须在Visual Studio上使用WPF在应用程序上创建此代码。 The data came from a file. 数据来自文件。 I know how to extract the data and put it in the DataGrid, but I absolutely don't know how to get the value of the cell... For example I want to get the "1.3" when the user changed the value of the cell. 我知道如何提取数据并将其放入DataGrid中,但是我绝对不知道如何获取单元格的值...例如,当用户更改参数值时,我想获取“ 1.3”细胞。

我做了什么

you can use CellEditEnding Event of datagrid. 您可以使用datagrid的CellEditEnding事件。 When the user changes the value in a cell, the event will be fired 当用户更改单元格中的值时,将触发该事件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM