melody

DataGridView选定行对应数据集中的数据行


1 DataGridViewRow gridRow = dgvProducts.CurrentRow;
2 DataRowView rowView = (DataRowView)gridRow.DataBoundItem;
3 ProductData.ProductRow sourceRow = (ProductData.ProductRow)rowView.Row;

注:dgvProducts是用来显示数据的DataGridView,ProductData是自定义的数据集。

分类:

技术点:

相关文章:

  • 2021-09-20
  • 2022-12-23
  • 2022-01-21
  • 2021-09-20
  • 2021-11-04
  • 2022-12-23
  • 2022-02-08
  • 2022-12-23
猜你喜欢
  • 2021-11-14
  • 2021-12-02
  • 2021-06-06
  • 2021-11-04
  • 2022-12-23
  • 2022-01-11
相关资源
相似解决方案