ممنون بابت راهنماییتون.
حالا من این کد رو واسه Textbox یی که به گرید اضافه کردم به شکل زیر استفاده کردم ولی خطا میده...
        private void dataGridView1_CellLeave(object sender, DataGridViewCellEventArgs e)
{
bool dataValid = true;
if (e.ColumnIndex == 0)
{
string buffer = dataGridView1[0, e.RowIndex].Value.ToString();
foreach (char alpha in buffer)
{
if (!char.IsDigit(alpha))
{
dataValid = false;
return;
}
}
if (dataValid == false)
dataGridView1.CurrentCell.ErrorText = "مقدار این فیلد باید از نوع عددی باشد";
}
}

اینم خطاش
Object reference not set to an instance of an object.