Guest User

Untitled

a guest
Oct 23rd, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. dgv.DataSource = myDateTable;
  2.  
  3. private static void SelectRowByOrderID(DataGridView dgv, string orderID)
  4. {
  5. dgv.Rows
  6. .OfType<DataGridViewRow>()
  7. .Where(x => (string)x.Cells["#"].Value == orderID)
  8. .ToArray<DataGridViewRow>()[0]
  9. .Selected = true;
  10. }
Add Comment
Please, Sign In to add comment