Hi,
You need to write a logic for validating Date like.
void dataGridView1_CellValidating(object sender, DataGridViewCellValidatingEventArgs e)
{
DateTime StartDate = "7/1/2005";
DateTime EndDate = "21/1/2005"
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.
Thanks,
Imdadhusen