Monday, 15 June 2015

c# - How do I get a DataRow from a row in a DataGridView -


I am using a database of Windows Forms DataGridView . How do I get a user from the selected row in DataGridView from DataRow to DataTable ? What is its source?

  datetime line = (DataRowView) DataGridViewRow.DataBoundItem) .Rao  < / Pre> 

Assume that you have made a simple DataTable .

  MyTypedDataRow line = (MyTypedDataRow) (DataRowView) DataGridViewRow.DataBoundItem). Row  

assuming that you've forced a typed dataset.

See for more information.


No comments:

Post a Comment