Guest User

Untitled

a guest
Jan 23rd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. public void Validate_Month(DataGridView dataGridView, int month, int select)
  2. {
  3. decimal num;
  4.  
  5. if (dataGridView.ColumnCount > 3)
  6. {
  7. for (int h = select; h <= month; h++)
  8. {
  9. for (int i = 0; i < dataGridView.RowCount; i++)
  10. {
  11. if (!Decimal.TryParse(dataGridView[h, i].Value.ToString(), out num))
  12. {
  13. if (dataGridView[h, i].Value.ToString() == null || dataGridView[h, i].Value.ToString() == "")
  14. {
  15.  
  16. }
  17. else
  18. {
  19. MessageBox.Show("Row not decimal:" + " [ " + dataGridView[h, i].Value.ToString() + "] in column " + dataGridView.Columns[h].Name);
  20. }
  21. }
  22. }
  23. }
  24. }
  25. }
  26. }
Add Comment
Please, Sign In to add comment