Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void Validate_Month(DataGridView dataGridView, int month, int select)
- {
- decimal num;
- if (dataGridView.ColumnCount > 3)
- {
- for (int h = select; h <= month; h++)
- {
- for (int i = 0; i < dataGridView.RowCount; i++)
- {
- if (!Decimal.TryParse(dataGridView[h, i].Value.ToString(), out num))
- {
- if (dataGridView[h, i].Value.ToString() == null || dataGridView[h, i].Value.ToString() == "")
- {
- }
- else
- {
- MessageBox.Show("Row not decimal:" + " [ " + dataGridView[h, i].Value.ToString() + "] in column " + dataGridView.Columns[h].Name);
- }
- }
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment