How do I get a DataRow from a row in a DataGridView

后端 未结 4 595
长情又很酷
长情又很酷 2020-12-13 09:05

I\'m using a databound Windows Forms DataGridView. how do I go from a user selected row in the DataGridView to the DataRow of the

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-13 09:52

    In Visual Studio 2017 .NET 4.5, I had success with

     var row = (DataRowView) e.Row.DataItem;
    

提交回复
热议问题