【问题标题】:how to enter the string value in a particular cell of DataGrid in WPF如何在WPF中DataGrid的特定单元格中输入字符串值
【发布时间】:2011-08-09 10:11:47
【问题描述】:

大家好, 如何在 WPF 中 DataGrid 的特定单元格中输入字符串值。 提前致谢。

【问题讨论】:

  • 您必须更加精确。您是在谈论可编辑的单元格还是想以编程方式进行?您的单元格是否绑定到视图模型?

标签: c# .net wpf


【解决方案1】:

我们可以这样做

void OurGrdEditEnding(object sender, DataGridRowEditEndingEventArgs e)
 {

       DataRowView dRowView = e.Row.Item as DataRowView;
       string sName = dRowView.Row["columnName"].ToString();
 }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-10-04
    • 1970-01-01
    • 2012-08-19
    • 2022-06-23
    • 2014-08-29
    • 1970-01-01
    • 2013-04-04
    • 1970-01-01
    相关资源
    最近更新 更多