WPFデータグリッドはセルを取得します

異なる細胞WPFとWinフォーム取得モード、細胞型をキャストするために、必要に応じて

1.違い

(1)Winフォーム

文字列strは=(文字列)dataGrid.Rows [ 0] .Cells [ 0] .Valueの。

 

(2)WPF

文字列str =(dataGrid.Columns [ 0] .GetCellContent(dataGrid.Items [ 0])のTextBlockなど)の.text。

おすすめ

転載: www.cnblogs.com/xiale/p/11416279.html