Foreach row in datagrid?

  • Thread starter Thread starter Phill
  • Start date Start date
P

Phill

In the compact environment, how can I loop through the rows of a datagrid? I
what to look at column 3 of each row to determine if I need to insert or
update a record (column 3 is an ID).
Thanks
 
In the compact environment, how can I loop through the rows of a
datagrid? I what to look at column 3 of each row to determine if I need
to insert or update a record (column 3 is an ID).
Thanks

foreach (DataGridViewRow player in grid.Rows)
{
if (temp.playerLookup.ContainsKey(Convert.ToInt32(player.Cells
["id"].Value)))
{
player.Visible = false;
}
}
 
Back
Top