0.WPF与WinForm获取单元格方式不同,需要as强制转换 单元格类型

1.区别

(1)WinForm

string str = (string)dataGrid.Rows[0].Cells[0].Value;

 

(2)WPF

string str = (dataGrid.Columns[0].GetCellContent(dataGrid.Items[0]) as TextBlock).Text;

 

相关文章:

  • 2022-02-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-01
  • 2022-12-23
  • 2021-09-07
  • 2022-12-23
  • 2021-06-29
相关资源
相似解决方案