break

C#: Convert from DataGridViewRow to DataRow

I actually do this a lot, here’s how:

foreach (DataGridViewRow gridrow in DataGridView.Rows)
{
DataRow datarow = (gridrow.DataBoundItem as DataRowView).Row;
// do something with the datarow
}

2 Responses

  1. Rogelio Morrell Says:

    No me has dicho cuando vas a exponer en Ineta. Seria solido cualquier cosa de WCF y WPF. Dejame saber

    Muy cool tu site, lo encontre con google.com

    Rogelio

  2. Babak Says:

    Thanks. This works very well for me.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.