Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. private void SelectAllItems()
  2. {
  3. foreach (DataGridViewRow row in itemsBySupplier.Rows)
  4. {
  5. DataGridViewCheckBoxCell check = (DataGridViewCheckBoxCell)row.Cells["selectItem"];
  6. check.Value = check.TrueValue;
  7. }
  8. }
  9.  
  10. foreach (DataGridViewRow row in itemsBySupplier.Rows)
  11. {
  12. DataGridViewCheckBoxCell check = (DataGridViewCheckBoxCell)row.Cells["selectItem"];
  13.  
  14. string hid = row.Cells["Hid"].Value.ToString();
  15.  
  16. if (Ws.ToCreate[_supplier].Count(i => i.Hid == hid) > 0)
  17. {
  18. check.Value = check.TrueValue;
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement