Hi,
You need to write a logic for validating Date like.
void dataGridView1_CellValidating(object sender, DataGridViewCellValidatingEventArgs e)
{
DateTime StartDate = dataGridView1.Rows[0].Cells["Date"];
DateTime EndDate = dataGridView1.Rows[dataGridView1.Rows.Count-1].Cells["Date"]
DateTime enetedDate = dataGridView1.Rows[e.RowIndex].Cells["Date"];
if( enetedDate >= StartDate && enetedDate<= EndDate)
{
}
else
{
MessageBox.Show("Invalid Date!");
e.Cancel = true;
}
}
Note:
Please use DataType conversion before use. because i haven't implemented it.