Hello,
One way to do it is to use the CellValidating event.
See here:
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.cellvalidating.aspx[
^]
you could do it like that:
private void dataGridView1_CellValidating(object sender, DataGridViewCellValidatingEventArgs e)
{
if (e.ColumnIndex == _indexOfColumnTocheck)
{
int value;
if (int.TryParse((string)e.FormattedValue, out value))
{
if (value > 100) { e.Cancel = true; }
}
else
{
e.Cancel = true;
}
}
}
Valery.