【问题标题】:it is not working, what do I do dataGrid2.Items[row] .Cells[column] .Text = "text"; [duplicate]它不工作,我该怎么办 dataGrid2.Items[row] .Cells[column] .Text = "text"; [复制]
【发布时间】:2013-06-11 03:43:25
【问题描述】:

我有一行,列 id。

此语句无效,我该怎么办?

dataGrid2.Items[row] .Cells[column] .Text = "text";

【问题讨论】:

标签: c# wpf datagrid


【解决方案1】:

试试这个:

dataGrid2.Rows[row][column].Value = "text";

【讨论】:

  • WPF 中没有Rows DataGrid
  • 错误 1“System.Windows.Controls.DataGrid”不包含“Rows”的定义,并且没有扩展方法“Rows”接受“System.Windows.Controls.DataGrid”类型的第一个参数可以找到(您是否缺少 using 指令或程序集引用?)
  • 我想在添加两个单元格值后获取当前单元格值和下一个单元格值,然后使用 c# 将此值设置为 wpf 中 datagrid 中的另一个下一个单元格(动态)
猜你喜欢
  • 1970-01-01
  • 2016-11-25
  • 1970-01-01
  • 2021-07-20
  • 2019-07-04
  • 2011-06-28
  • 1970-01-01
  • 1970-01-01
  • 2012-04-14
相关资源
最近更新 更多