0

我正在使用 C# 在 Windows 窗体中工作。

我目前正在从事一个项目,我希望能够从我的 datagridview (DGV) 中选择一行,并从该选定的行中尝试从文件夹中找到一个 CSV 文件。

For example if I select a row from my first DGV the programme should automatically recognise that the cell in column 4 is the folder directory name of where the CSV file is located in my documents, and when that row is selected it automatically displays the csv file在第二辆 DGV 中。

任何帮助将不胜感激。

4

1 回答 1

0
  1. 将处理程序附加到 DataGridView.CellMouseClick 事件链接
  2. 从 DataGridViewCellMouseEventArgs 参数获取行索引。
  3. 从单击行内的第 4 列获取数据
  4. 打开文件并将所有数据放入第二个 DGV
于 2013-01-08T15:45:02.020 回答